# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

ligo_error.h

Go to the documentation of this file.
00001 
00007 /* Copyright, 2000, 2001 Nevrax Ltd.
00008  *
00009  * This file is part of NEVRAX NEL.
00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2, or (at your option)
00013  * any later version.
00014 
00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * General Public License for more details.
00019 
00020  * You should have received a copy of the GNU General Public License
00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00023  * MA 02111-1307, USA.
00024  */
00025 
00026 #ifndef NL_LIGO_ERROR_H
00027 #define NL_LIGO_ERROR_H
00028 
00029 #include "nel/misc/types_nl.h"
00030 
00031 #include <vector>
00032 
00033 namespace NLLIGO
00034 {
00035 
00043 class CLigoError
00044 {
00045 public:
00046         enum TError
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         };
00102 
00104         CLigoError();
00105 
00107         void clear ();
00108 
00110         void pushVertexError (TError code, uint id, uint edge=0xffffffff);
00111 
00113         uint numVertexError () const;
00114 
00116         TError getVertexError (uint error, uint &id, uint &edge) const;
00117 
00119         static const char* getStringError (TError errorCode);
00120 
00121 public:
00122 
00124         TError          MainError;
00125 
00126 private:
00127 
00129         class CVertex
00130         {
00131         public:
00132 
00134                 CVertex (TError code, uint id, uint edge)
00135                 {
00136                         Code = code;
00137                         Id = id;
00138                         Edge = edge;
00139                 }
00140         public:
00141 
00143                 TError  Code;
00144 
00146                 uint    Id;
00147 
00149                 uint    Edge;
00150         };
00151 
00153         std::vector<CVertex>            _VertexError;
00154 
00156         static const char* _StringError[];
00157 };
00158 
00159 }
00160 
00161 #endif // NL_LIGO_ERROR_H
00162 
00163 /* End of ligo_error.h */