Visitor.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/geometry/Visitor.h
22 
23  \brief A visitor interface for the Geometry hierarchy.
24 */
25 
26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_VISITOR_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_VISITOR_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // Forward declarations
33 #include "../geometry_fw.h"
34 
35 namespace te
36 {
37  namespace gm
38  {
39  /*!
40  \class Visitor
41 
42  \brief A visitor interface for the Geometry hierarchy.
43  */
45  {
46  public:
47 
48  /** @name Initializer Methods
49  * Methods related to instantiation and destruction.
50  */
51  //@{
52 
53  /*! \brief Default constructor. */
54  Visitor() {}
55 
56  /*! \brief Virtual destructor. */
57  virtual ~Visitor() {}
58 
59  //@}
60 
61  /** @name Select
62  * All concrete visitors must implement these methods.
63  */
64  //@{
65 
66  virtual void visit(const Curve& visited) = 0;
67  virtual void visit(const Geometry& visited) = 0;
68  virtual void visit(const GeometryCollection& visited) = 0;
69  virtual void visit(const LinearRing& visited) = 0;
70  virtual void visit(const LineString& visited) = 0;
71  virtual void visit(const MultiCurve& visited) = 0;
72  virtual void visit(const MultiLineString& visited) = 0;
73  virtual void visit(const MultiPoint& visited) = 0;
74  virtual void visit(const MultiPolygon& visited) = 0;
75  virtual void visit(const MultiSurface& visited) = 0;
76  virtual void visit(const AbstractPoint& visited) = 0;
77  virtual void visit(const Point& visited) = 0;
78  virtual void visit(const PointM& visited) = 0;
79  virtual void visit(const PointZ& visited) = 0;
80  virtual void visit(const PointZM& visited) = 0;
81  virtual void visit(const PointKd& visited) = 0;
82  virtual void visit(const Polygon& visited) = 0;
83  virtual void visit(const PolyhedralSurface& visited) = 0;
84  virtual void visit(const Surface& visited) = 0;
85  virtual void visit(const TIN& visited) = 0;
86  virtual void visit(const Triangle& visited) = 0;
87  virtual void visit(const CircularString& visited) = 0;
88  virtual void visit(const CompoundCurve& visited) = 0;
89  virtual void visit(const CurvePolygon& visited) = 0;
90 
91  //@}
92  };
93 
94  } // end namespace gm
95 } // end namespace te
96 
97 
98 #endif // __TERRALIB_GEOMETRY_INTERNAL_VISITOR_H
99 
PolyhedralSurface is a contiguous collection of polygons, which share common boundary segments...
MultiPolygon is a MultiSurface whose elements are Polygons.
Definition: MultiPolygon.h:50
Curve is an abstract class that represents 1-dimensional geometric objects stored as a sequence of co...
Definition: Curve.h:58
A point with a z-coordinate value and an associated measurement.
Definition: PointZM.h:51
A point with an associated measure.
Definition: PointM.h:51
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:76
TIN (triangulated irregular network) is a PolyhedralSurface consisting only of Triangle patches...
Definition: TIN.h:50
A LinearRing is a LineString that is both closed and simple.
Definition: LinearRing.h:53
A k-dimensional point.
Definition: PointKd.h:53
MultiPoint is a GeometryCollection whose elements are restricted to points.
Definition: MultiPoint.h:50
A point with z-coordinate value.
Definition: PointZ.h:51
LineString is a curve with linear interpolation between points.
Definition: LineString.h:62
Triangle is a polygon with 3 distinct, non-collinear vertices and no interior boundary.
Definition: Triangle.h:50
A point with x and y coordinate values.
Definition: Point.h:50
URI C++ Library.
CompoundCurve is a curve that may have circular and linear segments.
Definition: CompoundCurve.h:53
CurvePolygon is a planar surface defined by 1 exterior boundary and 0 or more interior boundaries...
Definition: CurvePolygon.h:57
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
MultiLineString is a MultiCurve whose elements are LineStrings.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:50
MultiSurface is a class that represents a 2-dimensional GeometryCollection whose elements are surface...
Definition: MultiSurface.h:54
MultiCurve is a class that represents a 1-dimensional GeometryCollection whose elements are curves...
Definition: MultiCurve.h:50
virtual ~Visitor()
Virtual destructor.
Definition: Visitor.h:57
Configuration flags for the Vector Geometry Model of TerraLib.
It is a collection of other geometric objects.
A base abstract class for 0-dimensional geometric objects that represents a single location in coordi...
Definition: AbstractPoint.h:50
CircularString is a curve with circular interpolation between points.
Surface is an abstract class that represents a 2-dimensional geometric objects.
Definition: Surface.h:54
A visitor interface for the Geometry hierarchy.
Definition: Visitor.h:44
Visitor()
Default constructor.
Definition: Visitor.h:54