MySQL  8.0.22
Source Code Documentation
gis::Geometry_visitor Class Referenceabstract

Abstract visitor class to be used on class Geometry and descendants. More...

#include <geometry_visitor.h>

Inheritance diagram for gis::Geometry_visitor:
gis::Nop_visitor gis::Coordinate_range_visitor gis::Ring_flip_visitor gis::Wkb_size_visitor gis::Wkb_visitor

Public Member Functions

 Geometry_visitor ()
 
virtual ~Geometry_visitor ()
 
virtual bool visit_enter (Geometry *g)=0
 Enters a compound geometry. More...
 
virtual bool visit_enter (Curve *)=0
 
virtual bool visit_enter (Linestring *)=0
 
virtual bool visit_enter (Linearring *)=0
 
virtual bool visit_enter (Surface *)=0
 
virtual bool visit_enter (Polygon *)=0
 
virtual bool visit_enter (Geometrycollection *)=0
 
virtual bool visit_enter (Multipoint *)=0
 
virtual bool visit_enter (Multicurve *)=0
 
virtual bool visit_enter (Multilinestring *)=0
 
virtual bool visit_enter (Multisurface *)=0
 
virtual bool visit_enter (Multipolygon *)=0
 
virtual bool visit (Geometry *g)=0
 Visits a geometry. More...
 
virtual bool visit (Point *)=0
 
virtual bool visit (Curve *)=0
 
virtual bool visit (Linestring *)=0
 
virtual bool visit (Linearring *)=0
 
virtual bool visit (Surface *)=0
 
virtual bool visit (Polygon *)=0
 
virtual bool visit (Geometrycollection *)=0
 
virtual bool visit (Multipoint *)=0
 
virtual bool visit (Multicurve *)=0
 
virtual bool visit (Multilinestring *)=0
 
virtual bool visit (Multisurface *)=0
 
virtual bool visit (Multipolygon *)=0
 
virtual bool visit_leave (Geometry *g)=0
 Leaves a compound geometry. More...
 
virtual bool visit_leave (Curve *)=0
 
virtual bool visit_leave (Linestring *)=0
 
virtual bool visit_leave (Linearring *)=0
 
virtual bool visit_leave (Surface *)=0
 
virtual bool visit_leave (Polygon *)=0
 
virtual bool visit_leave (Geometrycollection *)=0
 
virtual bool visit_leave (Multipoint *)=0
 
virtual bool visit_leave (Multicurve *)=0
 
virtual bool visit_leave (Multilinestring *)=0
 
virtual bool visit_leave (Multisurface *)=0
 
virtual bool visit_leave (Multipolygon *)=0
 

Detailed Description

Abstract visitor class to be used on class Geometry and descendants.

A visitor will visit all elements of a compound geometry, always going down to each point unless the geometry is empty. E.g., when visiting a linestring, the visitor will descend into each point of the linestring.

The visitor can abort execution at any time. This is done by returning true from a visit() or visit_leave() function. If these functions return false, execution will continue. The accept() member function on geometries returns true if the visitor aborte exectuion and false otherwise.

Constructor & Destructor Documentation

◆ Geometry_visitor()

gis::Geometry_visitor::Geometry_visitor ( )
inline

◆ ~Geometry_visitor()

virtual gis::Geometry_visitor::~Geometry_visitor ( )
inlinevirtual

Member Function Documentation

◆ visit() [1/13]

virtual bool gis::Geometry_visitor::visit ( Geometry g)
pure virtual

Visits a geometry.

This is called on each non-compound geometry and between visiting descendants. E.g., visit(Linestring *) will be called after visiting the first point in the linestring, then after visiting the second, etc., but not after visiting the last point.

Parameters
gThe geometry to visit.
Return values
trueAbort visitor execution.
falseContinue visitor execution.

Implemented in gis::Nop_visitor.

◆ visit() [2/13]

virtual bool gis::Geometry_visitor::visit ( Point )
pure virtual

◆ visit() [3/13]

virtual bool gis::Geometry_visitor::visit ( Curve )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [4/13]

virtual bool gis::Geometry_visitor::visit ( Linestring )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [5/13]

virtual bool gis::Geometry_visitor::visit ( Linearring )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [6/13]

virtual bool gis::Geometry_visitor::visit ( Surface )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [7/13]

virtual bool gis::Geometry_visitor::visit ( Polygon )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [8/13]

virtual bool gis::Geometry_visitor::visit ( Geometrycollection )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [9/13]

virtual bool gis::Geometry_visitor::visit ( Multipoint )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [10/13]

virtual bool gis::Geometry_visitor::visit ( Multicurve )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [11/13]

virtual bool gis::Geometry_visitor::visit ( Multilinestring )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [12/13]

virtual bool gis::Geometry_visitor::visit ( Multisurface )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit() [13/13]

virtual bool gis::Geometry_visitor::visit ( Multipolygon )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_enter() [1/12]

virtual bool gis::Geometry_visitor::visit_enter ( Geometry g)
pure virtual

Enters a compound geometry.

This is called on entry to a compound geometry, i.e., all geometries except points.

Parameters
gThe geometry to visit.
Return values
trueDon't descend into children.
falseDescend into children.

Implemented in gis::Nop_visitor, gis::Coordinate_range_visitor, gis::Wkb_visitor, and gis::Wkb_size_visitor.

◆ visit_enter() [2/12]

virtual bool gis::Geometry_visitor::visit_enter ( Curve )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_enter() [3/12]

virtual bool gis::Geometry_visitor::visit_enter ( Linestring )
pure virtual

◆ visit_enter() [4/12]

virtual bool gis::Geometry_visitor::visit_enter ( Linearring )
pure virtual

◆ visit_enter() [5/12]

virtual bool gis::Geometry_visitor::visit_enter ( Surface )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_enter() [6/12]

virtual bool gis::Geometry_visitor::visit_enter ( Polygon )
pure virtual

◆ visit_enter() [7/12]

virtual bool gis::Geometry_visitor::visit_enter ( Geometrycollection )
pure virtual

◆ visit_enter() [8/12]

virtual bool gis::Geometry_visitor::visit_enter ( Multipoint )
pure virtual

◆ visit_enter() [9/12]

virtual bool gis::Geometry_visitor::visit_enter ( Multicurve )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_enter() [10/12]

virtual bool gis::Geometry_visitor::visit_enter ( Multilinestring )
pure virtual

◆ visit_enter() [11/12]

virtual bool gis::Geometry_visitor::visit_enter ( Multisurface )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_enter() [12/12]

virtual bool gis::Geometry_visitor::visit_enter ( Multipolygon )
pure virtual

◆ visit_leave() [1/12]

virtual bool gis::Geometry_visitor::visit_leave ( Geometry g)
pure virtual

Leaves a compound geometry.

Called after visiting the last child of a compound geometry. The return value is returned to the accept() function.

Parameters
gThe geometry to visit.
Return values
trueAbort visitor execution.
falseContinue visitor execution.

Implemented in gis::Nop_visitor.

◆ visit_leave() [2/12]

virtual bool gis::Geometry_visitor::visit_leave ( Curve )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [3/12]

virtual bool gis::Geometry_visitor::visit_leave ( Linestring )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [4/12]

virtual bool gis::Geometry_visitor::visit_leave ( Linearring )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [5/12]

virtual bool gis::Geometry_visitor::visit_leave ( Surface )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [6/12]

virtual bool gis::Geometry_visitor::visit_leave ( Polygon )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [7/12]

virtual bool gis::Geometry_visitor::visit_leave ( Geometrycollection )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [8/12]

virtual bool gis::Geometry_visitor::visit_leave ( Multipoint )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [9/12]

virtual bool gis::Geometry_visitor::visit_leave ( Multicurve )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [10/12]

virtual bool gis::Geometry_visitor::visit_leave ( Multilinestring )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [11/12]

virtual bool gis::Geometry_visitor::visit_leave ( Multisurface )
pure virtual

Implemented in gis::Nop_visitor.

◆ visit_leave() [12/12]

virtual bool gis::Geometry_visitor::visit_leave ( Multipolygon )
pure virtual

Implemented in gis::Nop_visitor.


The documentation for this class was generated from the following file: