MySQL  8.0.23
Source Code Documentation
gis::Geometrycollection Class Referenceabstract

A collection of geometries. More...

#include <geometries.h>

Inheritance diagram for gis::Geometrycollection:
gis::Geometry gis::Cartesian_geometrycollection gis::Geographic_geometrycollection gis::Multicurve gis::Multipoint gis::Multisurface gis::Multilinestring gis::Cartesian_multipoint gis::Geographic_multipoint gis::Multipolygon gis::Cartesian_multilinestring gis::Geographic_multilinestring gis::Cartesian_multipolygon gis::Geographic_multipolygon

Public Member Functions

Geometry_type type () const override
 Gets the geometry type of the object. More...
 
bool accept (Geometry_visitor *v) override=0
 Applies a hierarchical visitor to this geometry. More...
 
virtual void push_back (const Geometry &g)=0
 Adds a geometry to the collection. More...
 
virtual void push_back (Geometry &&g)=0
 
virtual bool empty () const =0
 Checks if the collection is empty. More...
 
virtual std::size_t size () const =0
 Returns the size of the geometrycollection. More...
 
virtual void resize (std::size_t count)=0
 Resizes the geometrycollection to contain a given number of elements. More...
 
virtual void clear () noexcept=0
 Removes all geometries from the geometrycollection. More...
 
virtual Geometryoperator[] (std::size_t i)=0
 
virtual const Geometryoperator[] (std::size_t i) const =0
 
- Public Member Functions inherited from gis::Geometry
 Geometry ()=default
 
virtual ~Geometry ()=default
 
 Geometry (const Geometry &)=default
 
Geometryoperator= (const Geometry &)=default
 
virtual Coordinate_system coordinate_system () const =0
 Gets the coordinate system. More...
 
virtual bool is_empty () const =0
 Check if this is an empty geometry. More...
 

Detailed Description

A collection of geometries.

Geometrycollection is an instantiable type in SQL. It is the only instantiable non-leaf geometry type.

The Geometrycollection class places no restrictions on type, overlapping, etc. Subclasses do.

Member Function Documentation

◆ accept()

bool gis::Geometrycollection::accept ( Geometry_visitor v)
overridepure virtual

Applies a hierarchical visitor to this geometry.

See also
gis::Geometry_visitor
Parameters
vA hierarchical visitor.
Return values
trueThe execution was aborted by the visitor.
falseThe execution completed.

Implements gis::Geometry.

Implemented in gis::Multipolygon, gis::Multisurface, gis::Multilinestring, gis::Multicurve, gis::Multipoint, gis::Geographic_multipolygon, gis::Cartesian_multipolygon, gis::Geographic_multilinestring, gis::Cartesian_multilinestring, gis::Geographic_multipoint, gis::Cartesian_multipoint, gis::Geographic_geometrycollection, and gis::Cartesian_geometrycollection.

◆ clear()

virtual void gis::Geometrycollection::clear ( )
pure virtualnoexcept

◆ empty()

virtual bool gis::Geometrycollection::empty ( ) const
pure virtual

◆ operator[]() [1/2]

◆ operator[]() [2/2]

◆ push_back() [1/2]

virtual void gis::Geometrycollection::push_back ( const Geometry g)
pure virtual

◆ push_back() [2/2]

◆ resize()

virtual void gis::Geometrycollection::resize ( std::size_t  count)
pure virtual

Resizes the geometrycollection to contain a given number of elements.

If the new size is smaller than the current size, the remaining geometries are discarded.

Parameters
[in]countThe new number of geometries.

Implemented in gis::Geographic_multipolygon, gis::Cartesian_multipolygon, gis::Geographic_multilinestring, gis::Cartesian_multilinestring, gis::Geographic_multipoint, gis::Cartesian_multipoint, gis::Geographic_geometrycollection, and gis::Cartesian_geometrycollection.

◆ size()

virtual std::size_t gis::Geometrycollection::size ( ) const
pure virtual

◆ type()

Geometry_type gis::Geometrycollection::type ( ) const
inlineoverridevirtual

Gets the geometry type of the object.

Returns
The type of this object

Implements gis::Geometry.

Reimplemented in gis::Multisurface, gis::Multicurve, gis::Multipolygon, gis::Multilinestring, and gis::Multipoint.


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