MySQL 8.4.2
Source Code Documentation
gis::Wkb_visitor Class Reference

A visitor that serializes the geometry to little-endian WKB and appends it to a string. More...

#include <wkb_visitor.h>

Inheritance diagram for gis::Wkb_visitor:
[legend]

Public Member Functions

 Wkb_visitor (const dd::Spatial_reference_system *srs, char *wkb, size_t wkb_size)
 Construct a new WKB visitor. More...
 
bool visit_enter (Geometry *) override
 Enters a compound geometry. More...
 
bool visit_enter (Linestring *ls) override
 
bool visit_enter (Polygon *py) override
 
bool visit_enter (Geometrycollection *gc) override
 
bool visit (Point *pt) override
 
bool visit_enter (Geometry *) override
 Enters a compound geometry. More...
 
bool visit_enter (Curve *c) override
 
bool visit_enter (Linestring *ls) override
 
bool visit_enter (Linearring *lr) override
 
bool visit_enter (Surface *s) override
 
bool visit_enter (Polygon *py) override
 
bool visit_enter (Geometrycollection *gc) override
 
bool visit_enter (Multipoint *mpt) override
 
bool visit_enter (Multicurve *mc) override
 
bool visit_enter (Multilinestring *mls) override
 
bool visit_enter (Multisurface *ms) override
 
bool visit_enter (Multipolygon *mpy) override
 
bool visit (Geometry *) override
 Visits a geometry. More...
 
bool visit (Point *pt) override
 
bool visit (Curve *c) override
 
bool visit (Linestring *ls) override
 
bool visit (Linearring *lr) override
 
bool visit (Surface *s) override
 
bool visit (Polygon *py) override
 
bool visit (Geometrycollection *gc) override
 
bool visit (Multipoint *mpt) override
 
bool visit (Multicurve *mc) override
 
bool visit (Multilinestring *mls) override
 
bool visit (Multisurface *ms) override
 
bool visit (Multipolygon *mpy) override
 
- Public Member Functions inherited from gis::Nop_visitor
bool visit_leave (Geometry *) override
 Leaves a compound geometry. More...
 
bool visit_leave (Curve *c) override
 
bool visit_leave (Linestring *ls) override
 
bool visit_leave (Linearring *lr) override
 
bool visit_leave (Surface *s) override
 
bool visit_leave (Polygon *py) override
 
bool visit_leave (Geometrycollection *gc) override
 
bool visit_leave (Multipoint *mpt) override
 
bool visit_leave (Multicurve *mc) override
 
bool visit_leave (Multilinestring *mls) override
 
bool visit_leave (Multisurface *ms) override
 
bool visit_leave (Multipolygon *mpy) override
 
- Public Member Functions inherited from gis::Geometry_visitor
 Geometry_visitor ()=default
 
virtual ~Geometry_visitor ()=default
 

Private Attributes

const dd::Spatial_reference_systemm_srs
 Spatial reference system of the geometry. More...
 
const char * m_wkb
 The WKB string. More...
 
const size_t m_wkb_size
 Size of the buffer allocated for the WKB string. More...
 
char * m_wkb_current_position
 The position of the next character to be added to the string. More...
 

Detailed Description

A visitor that serializes the geometry to little-endian WKB and appends it to a string.

Constructor & Destructor Documentation

◆ Wkb_visitor()

gis::Wkb_visitor::Wkb_visitor ( const dd::Spatial_reference_system srs,
char *  wkb,
size_t  wkb_size 
)
inline

Construct a new WKB visitor.

Parameters
[in]srsThe spatial reference system of the geometry.
[in]wkbThe string to write the WKB to.
[in]wkb_sizeThe length of the WKB string buffer.

Member Function Documentation

◆ visit() [1/14]

bool gis::Nop_visitor::visit ( Curve c)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [2/14]

bool gis::Nop_visitor::visit ( Geometry g)
inlineoverridevirtual

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.

Reimplemented from gis::Nop_visitor.

◆ visit() [3/14]

bool gis::Nop_visitor::visit ( Geometrycollection gc)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [4/14]

bool gis::Nop_visitor::visit ( Linearring lr)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [5/14]

bool gis::Nop_visitor::visit ( Linestring ls)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [6/14]

bool gis::Nop_visitor::visit ( Multicurve mc)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [7/14]

bool gis::Nop_visitor::visit ( Multilinestring mls)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [8/14]

bool gis::Nop_visitor::visit ( Multipoint mpt)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [9/14]

bool gis::Nop_visitor::visit ( Multipolygon mpy)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [10/14]

bool gis::Nop_visitor::visit ( Multisurface ms)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [11/14]

bool gis::Nop_visitor::visit ( Point pt)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [12/14]

bool gis::Wkb_visitor::visit ( Point pt)
overridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [13/14]

bool gis::Nop_visitor::visit ( Polygon py)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit() [14/14]

bool gis::Nop_visitor::visit ( Surface s)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [1/16]

bool gis::Nop_visitor::visit_enter ( Curve c)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [2/16]

bool gis::Nop_visitor::visit_enter ( Geometry g)
inlineoverridevirtual

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.

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [3/16]

bool gis::Wkb_visitor::visit_enter ( Geometry g)
inlineoverridevirtual

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.

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [4/16]

bool gis::Nop_visitor::visit_enter ( Geometrycollection gc)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [5/16]

bool gis::Wkb_visitor::visit_enter ( Geometrycollection gc)
overridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [6/16]

bool gis::Nop_visitor::visit_enter ( Linearring lr)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [7/16]

bool gis::Nop_visitor::visit_enter ( Linestring ls)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [8/16]

bool gis::Wkb_visitor::visit_enter ( Linestring ls)
overridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [9/16]

bool gis::Nop_visitor::visit_enter ( Multicurve mc)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [10/16]

bool gis::Nop_visitor::visit_enter ( Multilinestring mls)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [11/16]

bool gis::Nop_visitor::visit_enter ( Multipoint mpt)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [12/16]

bool gis::Nop_visitor::visit_enter ( Multipolygon mpy)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [13/16]

bool gis::Nop_visitor::visit_enter ( Multisurface ms)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [14/16]

bool gis::Nop_visitor::visit_enter ( Polygon py)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [15/16]

bool gis::Wkb_visitor::visit_enter ( Polygon py)
overridevirtual

Reimplemented from gis::Nop_visitor.

◆ visit_enter() [16/16]

bool gis::Nop_visitor::visit_enter ( Surface s)
inlineoverridevirtual

Reimplemented from gis::Nop_visitor.

Member Data Documentation

◆ m_srs

const dd::Spatial_reference_system* gis::Wkb_visitor::m_srs
private

Spatial reference system of the geometry.

◆ m_wkb

const char* gis::Wkb_visitor::m_wkb
private

The WKB string.

◆ m_wkb_current_position

char* gis::Wkb_visitor::m_wkb_current_position
private

The position of the next character to be added to the string.

◆ m_wkb_size

const size_t gis::Wkb_visitor::m_wkb_size
private

Size of the buffer allocated for the WKB string.


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