GEOS: TopologyException.h Source File

GEOS 3.3.8

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

- File List

TopologyException.h
1 /**********************************************************************
2 * $Id: TopologyException.h 2824 2009-12-14 15:23:12Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2001-2002 Vivid Solutions Inc.
8 * Copyright (C) 2006 Refractions Research Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************/
16
17 #ifndef GEOS_UTIL_TOPOLOGYEXCEPTION_H
18 #define GEOS_UTIL_TOPOLOGYEXCEPTION_H
19
20 #include <geos/export.h>
21 #include <geos/util/GEOSException.h>
22 #include <geos/geom/Coordinate.h> // to be removed when .inl is available
23
24 #include <cassert>
25
26 namespace geos {
27 namespace util { // geos.util
28
36 class GEOS_DLL TopologyException: public GEOSException {
37 public:
38 TopologyException()
39 :
40 GEOSException("TopologyException", "")
41 {}
42
43 TopologyException(const std::string& msg)
44 :
45 GEOSException("TopologyException", msg)
46 {}
47
48 TopologyException(const std::string& msg, const geom::Coordinate& newPt)
49 :
50 GEOSException("TopologyException", msg + " at " + newPt.toString()),
51 pt(newPt)
52 {}
53
54 ~TopologyException() throw() {}
55 geom::Coordinate& getCoordinate() { return pt; }
56 private:
57 geom::Coordinate pt;
58 };
59
60 } // namespace geos::util
61 } // namespace geos
62
63
64 #endif // GEOS_UTIL_TOPOLOGYEXCEPTION_H
65
66 /**********************************************************************
67 * $Log$
68 * Revision 1.3 2006/03/23 15:10:29 strk
69 * Dropped by-pointer TopologyException constructor, various small cleanups
70 *
71 * Revision 1.2 2006/03/22 11:19:06 strk
72 * opPolygonize.h headers split.
73 *
74 * Revision 1.1 2006/03/09 16:46:49 strk
75 * geos::geom namespace definition, first pass at headers split
76 *
77 **********************************************************************/