GEOS  3.9.1dev
TopologyValidationError.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************
15  *
16  * Last port: operation/valid/TopologyValidationError.java rev. 1.16 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_OP_TOPOLOGYVALIDATIONERROR_H
21 #define GEOS_OP_TOPOLOGYVALIDATIONERROR_H
22 
23 #include <geos/export.h>
24 #include <string>
25 
26 #include <geos/geom/Coordinate.h> // for composition
27 
28 // Forward declarations
29 // none required
30 
31 namespace geos {
32 namespace operation { // geos::operation
33 namespace valid { // geos::operation::valid
34 
41 public:
42 
43  enum errorEnum {
55  eRingNotClosed
56  };
57 
58  TopologyValidationError(int newErrorType, const geom::Coordinate& newPt);
59  TopologyValidationError(int newErrorType);
60  geom::Coordinate& getCoordinate();
61  std::string getMessage();
62  int getErrorType();
63  std::string toString();
64 
65 private:
66  // Used const char* to reduce dynamic allocations
67  static const char* errMsg[];
68  int errorType;
70 };
71 
72 
73 } // namespace geos.operation.valid
74 } // namespace geos.operation
75 } // namespace geos
76 
77 #endif // GEOS_OP_TOPOLOGYVALIDATIONERROR_H
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Basic namespace for all GEOS functionalities.
Contains information about the nature and location of a geom::Geometry validation error...