#include <ligo_error.h>
Nevrax France
Definition at line 43 of file ligo_error.h.
Public Types | |
| enum | TError { NoError = 0, NoEdgeVertices, OpenedEdge, MultipleEdge, VertexList, NotInserted, Inserted, FlatZone, MustHave4Edges, NotSymetrical, NotSameVerticesNumber, NotSameVertex, NoCornerFound, TwoCornerVertices, CornerIsMissing, VertexAlreadyUsed, UnknownError, ErrorCount } |
Public Member Functions | |
| void | clear () |
| Clear the container. | |
| CLigoError () | |
| Constructor. | |
| TError | getVertexError (uint error, uint &id, uint &edge) const |
| Get a vertex error. | |
| uint | numVertexError () const |
| Get num vertex error. | |
| void | pushVertexError (TError code, uint id, uint edge=0xffffffff) |
| Push a vertex error code. | |
Static Public Member Functions | |
| const char * | getStringError (TError errorCode) |
| Get an error string. | |
Data Fields | |
| TError | MainError |
| Main error code. | |
Private Attributes | |
| std::vector< CVertex > | _VertexError |
| Vertex error. | |
Static Private Attributes | |
| const char * | _StringError [] |
| Error string. | |
|
|
Definition at line 46 of file ligo_error.h.
00047 {
00049 NoError =0,
00050
00052 NoEdgeVertices,
00053
00055 OpenedEdge,
00056
00058 MultipleEdge,
00059
00061 VertexList,
00062
00064 NotInserted,
00065
00067 Inserted,
00068
00070 FlatZone,
00071
00073 MustHave4Edges,
00074
00076 NotSymetrical,
00077
00079 NotSameVerticesNumber,
00080
00082 NotSameVertex,
00083
00085 NoCornerFound,
00086
00088 TwoCornerVertices,
00089
00091 CornerIsMissing,
00092
00094 VertexAlreadyUsed,
00095
00097 UnknownError,
00098
00100 ErrorCount
00101 };
|
|
|
Constructor.
Definition at line 33 of file ligo_error.cpp. References clear().
00034 {
00035 clear ();
00036 }
|
|
|
Clear the container.
Definition at line 80 of file ligo_error.cpp. References _VertexError, MainError, and NoError. Referenced by NLLIGO::CZoneTemplate::build(), NLLIGO::CZoneEdge::build(), NLLIGO::CMaterial::build(), CLigoError(), and NLLIGO::CZoneEdge::isSymetrical().
00081 {
00082 MainError = NoError;
00083 _VertexError.clear ();
00084 }
|
|
|
Get an error string.
Definition at line 111 of file ligo_error.cpp. References _StringError, ErrorCount, and UnknownError.
00112 {
00113 if (errorCode<=ErrorCount)
00114 {
00115 return _StringError[errorCode];
00116 }
00117 else
00118 {
00119 return _StringError[UnknownError];
00120 }
00121 }
|
|
||||||||||||||||
|
Get a vertex error.
Definition at line 70 of file ligo_error.cpp. References _VertexError, NLLIGO::CLigoError::CVertex::Code, NLLIGO::CLigoError::CVertex::Edge, NLLIGO::CLigoError::CVertex::Id, and uint.
00071 {
00072 const CVertex &vertex = _VertexError[error];
00073 id = vertex.Id;
00074 edge = vertex.Edge;
00075 return vertex.Code;
00076 }
|
|
|
Get num vertex error.
Definition at line 63 of file ligo_error.cpp. References _VertexError, and uint.
00064 {
00065 return _VertexError.size ();
00066 }
|
|
||||||||||||||||
|
Push a vertex error code.
Definition at line 40 of file ligo_error.cpp. References _VertexError, and uint. Referenced by NLLIGO::CZoneTemplate::build(), NLLIGO::CZoneEdge::build(), NLLIGO::CZoneEdge::isSymetrical(), and NLLIGO::CZoneEdge::isTheSame().
00041 {
00042 // Check if this vertex exist in the error list
00043 uint vertex;
00044 for (vertex=0; vertex<_VertexError.size(); vertex++)
00045 {
00046 if (_VertexError[vertex].Id == id)
00047 {
00048 _VertexError[vertex] = CVertex (code, id, edge);
00049 break;
00050 }
00051 }
00052
00053 // Not found ?
00054 if (vertex == _VertexError.size())
00055 {
00056 // Add a vertex error
00057 _VertexError.push_back (CVertex (code, id, edge));
00058 }
00059 }
|
|
|
Initial value:
{
"No error",
"No vertex in the edge list",
"Opened edges detected",
"Mulitple edge on the boundary",
"Vertex list invalid. One vertex should be a corner",
"The vertex has not been inserted in the edge list",
"The vertex has been inserted in the edge list",
"Flat zone, all vertices are in the same corner",
"The zone must have 4 edges to define a material",
"A edge of the zone is not symetrical",
"Not the same number of vertex",
"Some vertices are not the same",
"No corner found",
"A edge has two times the same corner",
"A corner is missing in this edge",
"A boundary vertex is used by multiple edges",
"Unkown error",
}
Definition at line 88 of file ligo_error.cpp. Referenced by getStringError(). |
|
|
Vertex error.
Definition at line 153 of file ligo_error.h. Referenced by clear(), getVertexError(), numVertexError(), and pushVertexError(). |
|
|
Main error code.
Definition at line 124 of file ligo_error.h. Referenced by NLLIGO::CZoneTemplate::build(), NLLIGO::CTransition::build(), NLLIGO::CMaterial::build(), clear(), NLLIGO::CZoneEdge::isSymetrical(), and NLLIGO::CZoneEdge::isTheSame(). |
1.3.6