GEOS  3.4.2
ShortCircuitedGeometryVisitor.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_GEOM_UTIL_SHORTCIRCUITEDGEOMETRYVISITOR_H
00017 #define GEOS_GEOM_UTIL_SHORTCIRCUITEDGEOMETRYVISITOR_H
00018 
00019 #include <geos/export.h>
00020 
00021 // Forward declarations
00022 namespace geos {
00023         namespace geom {
00024                 class Geometry;
00025         }
00026 }
00027 
00028 
00029 namespace geos {
00030 namespace geom { // geos.geom
00031 namespace util { // geos.geom.util
00032 
00039 class GEOS_DLL ShortCircuitedGeometryVisitor
00040 {
00041 
00042 private:
00043 
00044         bool done;
00045 
00046 protected:
00047 
00048         virtual void visit(const Geometry &element)=0;
00049         virtual bool isDone()=0;
00050 
00051 public:
00052 
00053         ShortCircuitedGeometryVisitor()
00054                 :
00055                 done(false)
00056                 {}
00057 
00058         void applyTo(const Geometry &geom);
00059 
00060         virtual ~ShortCircuitedGeometryVisitor() {}
00061 
00062 };
00063 
00064 } // namespace geos.geom.util
00065 } // namespace geos.geom
00066 } // namespace geos
00067 
00068 #endif