GEOS  3.4.2
ShortCircuitedGeometryVisitor.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_GEOM_UTIL_SHORTCIRCUITEDGEOMETRYVISITOR_H
17 #define GEOS_GEOM_UTIL_SHORTCIRCUITEDGEOMETRYVISITOR_H
18 
19 #include <geos/export.h>
20 
21 // Forward declarations
22 namespace geos {
23  namespace geom {
24  class Geometry;
25  }
26 }
27 
28 
29 namespace geos {
30 namespace geom { // geos.geom
31 namespace util { // geos.geom.util
32 
40 {
41 
42 private:
43 
44  bool done;
45 
46 protected:
47 
48  virtual void visit(const Geometry &element)=0;
49  virtual bool isDone()=0;
50 
51 public:
52 
54  :
55  done(false)
56  {}
57 
58  void applyTo(const Geometry &geom);
59 
60  virtual ~ShortCircuitedGeometryVisitor() {}
61 
62 };
63 
64 } // namespace geos.geom.util
65 } // namespace geos.geom
66 } // namespace geos
67 
68 #endif
A visitor to Geometry elements which can be short-circuited by a given condition. ...
Definition: ShortCircuitedGeometryVisitor.h:39
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167