GEOS: TopologyException.h Source File

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

- File List

# TopologyException.h

    00001 /**********************************************************************
    00002  * $Id: TopologyException.h 2824 2009-12-14 15:23:12Z mloskot $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2001-2002 Vivid Solutions Inc.
    00008  * Copyright (C) 2006 Refractions Research 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_UTIL_TOPOLOGYEXCEPTION_H
    00018 #define GEOS_UTIL_TOPOLOGYEXCEPTION_H
    00019
    00020 #include <geos/export.h>
    00021 #include <geos/util/GEOSException.h>
    00022 #include <geos/geom/Coordinate.h> // to be removed when .inl is available
    00023
    00024 #include <cassert>
    00025
    00026 namespace geos {
    00027 namespace util { // geos.util
    00028
    00036 class GEOS_DLL TopologyException: public GEOSException {
    00037 public:
    00038         TopologyException()
    00039                 :
    00040                 GEOSException("TopologyException", "")
    00041         {}
    00042
    00043         TopologyException(const std::string& msg)
    00044                 :
    00045                 GEOSException("TopologyException", msg)
    00046         {}
    00047
    00048         TopologyException(const std::string& msg, const geom::Coordinate& newPt)
    00049                 :
    00050                 GEOSException("TopologyException", msg + " at " + newPt.toString()),
    00051                 pt(newPt)
    00052         {}
    00053
    00054         ~TopologyException() throw() {}
    00055         geom::Coordinate& getCoordinate() { return pt; }
    00056 private:
    00057         geom::Coordinate pt;
    00058 };
    00059
    00060 } // namespace geos::util
    00061 } // namespace geos
    00062
    00063
    00064 #endif // GEOS_UTIL_TOPOLOGYEXCEPTION_H
    00065
    00066 /**********************************************************************
    00067  * $Log$
    00068  * Revision 1.3  2006/03/23 15:10:29  strk
    00069  * Dropped by-pointer TopologyException constructor, various small cleanups
    00070  *
    00071  * Revision 1.2  2006/03/22 11:19:06  strk
    00072  * opPolygonize.h headers split.
    00073  *
    00074  * Revision 1.1  2006/03/09 16:46:49  strk
    00075  * geos::geom namespace definition, first pass at headers split
    00076  *
    00077  **********************************************************************/