TopologyException.h

00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00007  * Copyright (C) 2006 Refractions Research Inc.
00008  *
00009  * This is free software; you can redistribute and/or modify it under
00010  * the terms of the GNU Lesser General Public Licence as published
00011  * by the Free Software Foundation. 
00012  * See the COPYING file for more information.
00013  *
00014  **********************************************************************/
00015 
00016 #ifndef GEOS_UTIL_TOPOLOGYEXCEPTION_H
00017 #define GEOS_UTIL_TOPOLOGYEXCEPTION_H
00018 
00019 #include <geos/export.h>
00020 #include <geos/util/GEOSException.h>
00021 #include <geos/geom/Coordinate.h> // to be removed when .inl is available
00022 
00023 #include <cassert>
00024 
00025 namespace geos {
00026 namespace util { // geos.util
00027 
00035 class GEOS_DLL TopologyException: public GEOSException {
00036 public:
00037         TopologyException()
00038                 :
00039                 GEOSException("TopologyException", "")
00040         {}
00041 
00042         TopologyException(const std::string& msg)
00043                 :
00044                 GEOSException("TopologyException", msg)
00045         {}
00046 
00047         TopologyException(const std::string& msg, const geom::Coordinate& newPt)
00048                 :
00049                 GEOSException("TopologyException", msg + " at " + newPt.toString()),
00050                 pt(newPt)
00051         {}
00052 
00053         ~TopologyException() throw() {}
00054         geom::Coordinate& getCoordinate() { return pt; }
00055 private:
00056         geom::Coordinate pt;
00057 };
00058 
00059 } // namespace geos::util
00060 } // namespace geos
00061 
00062 
00063 #endif // GEOS_UTIL_TOPOLOGYEXCEPTION_H

Generated on 30 Dec 2015 for GEOS by  doxygen 1.4.7