TopologyValidationError.h

00001 /**********************************************************************
00002  * $Id: TopologyValidationError.h 1820 2006-09-06 16:54:23Z mloskot $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2005-2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************/
00016 
00017 #ifndef GEOS_OP_TOPOLOGYVALIDATIONERROR_H
00018 #define GEOS_OP_TOPOLOGYVALIDATIONERROR_H
00019 
00020 #include <string>
00021 
00022 #include <geos/geom/Coordinate.h> // for composition
00023 
00024 // Forward declarations
00025 // none required
00026 
00027 namespace geos {
00028 namespace operation { // geos::operation
00029 namespace valid { // geos::operation::valid
00030 
00036 class TopologyValidationError {
00037 public:
00038 
00039         enum errorEnum {
00040                 eError,
00041                 eRepeatedPoint,
00042                 eHoleOutsideShell,
00043                 eNestedHoles,
00044                 eDisconnectedInterior,
00045                 eSelfIntersection,
00046                 eRingSelfIntersection,
00047                 eNestedShells,
00048                 eDuplicatedRings,
00049                 eTooFewPoints,
00050                 eInvalidCoordinate,
00051                 eRingNotClosed
00052         };
00053 
00054         TopologyValidationError(int newErrorType, const geom::Coordinate& newPt);
00055         TopologyValidationError(int newErrorType);
00056         geom::Coordinate& getCoordinate();
00057         std::string getMessage();
00058         int getErrorType();
00059         std::string toString();
00060 
00061 private:
00062         // Used const char* to reduce dynamic allocations
00063         static const char* errMsg[];
00064         int errorType;
00065         geom::Coordinate pt;
00066 };
00067 
00068 
00069 } // namespace geos.operation.valid
00070 } // namespace geos.operation
00071 } // namespace geos
00072 
00073 #endif // GEOS_OP_TOPOLOGYVALIDATIONERROR_H
00074 
00075 /**********************************************************************
00076  * $Log$
00077  * Revision 1.1  2006/03/20 16:57:44  strk
00078  * spatialindex.h and opValid.h headers split
00079  *
00080  **********************************************************************/
00081 

Generated on Fri Mar 27 04:53:04 2009 for GEOS by  doxygen 1.5.4