GEOS: TopologyException.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

TopologyException.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2006 Refractions Research 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 #ifndef GEOS_UTIL_TOPOLOGYEXCEPTION_H
17 #define GEOS_UTIL_TOPOLOGYEXCEPTION_H
18
19 #include <geos/export.h>
20 #include <geos/util/GEOSException.h>
21 #include <geos/geom/Coordinate.h> // to be removed when .inl is available
22
23 #include <cassert>
24
25 namespace geos {
26 namespace util { // geos.util
27
35 class GEOS_DLL TopologyException: public GEOSException {
36 public:
37 TopologyException()
38 :
39 GEOSException("TopologyException", "")
40 {}
41
42 TopologyException(const std::string& msg)
43 :
44 GEOSException("TopologyException", msg)
45 {}
46
47 TopologyException(const std::string& msg, const geom::Coordinate& newPt)
48 :
49 GEOSException("TopologyException", msg + " at " + newPt.toString()),
50 pt(newPt)
51 {}
52
53 ~TopologyException() throw() {}
54 geom::Coordinate& getCoordinate() { return pt; }
55 private:
56 geom::Coordinate pt;
57 };
58
59 } // namespace geos::util
60 } // namespace geos
61
62
63 #endif // GEOS_UTIL_TOPOLOGYEXCEPTION_H
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
geos::geom::Coordinate::toString
std::string toString() const
Returns a string of the form (x,y,z) .
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::util::GEOSException
Base class for all GEOS exceptions.
Definition: GEOSException.h:38
geos::util::TopologyException
Indicates an invalid or inconsistent topological situation encountered during processing.
Definition: TopologyException.h:35