MySQL  8.0.25
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 void pop_front ()=0
 Removes a geometry from the front of the collection. More...
 
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 Geometryfront ()=0
 Returns the first geometry of the collection. More...
 
virtual const Geometryfront () const =0
 
virtual Geometryoperator[] (std::size_t i)=0
 
virtual const Geometryoperator[] (std::size_t i) const =0
 
Geometrycollectionclone () const override=0
 Clone pattern to easily duplicate a Geometrycollection. More...
 
- 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...
 

Static Public Member Functions

static GeometrycollectionCreateGeometrycollection (Coordinate_system coordinate_system)
 Creates a subclass of Geometrycollection from a Coordinate_system. More...
 
static Geometrycollectioncreate_geometrycollection (Coordinate_system coordinate_system)
 Creates a subclass from a Coordinate_system. 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

◆ clone()

Geometrycollection* gis::Geometrycollection::clone ( ) const
overridepure virtual

Clone pattern to easily duplicate a Geometrycollection.

Returns
A pointer to a copy of the Geometrycollection that caller must free when it is done with it.

Implements gis::Geometry.

Implemented in gis::Multipolygon, gis::Multilinestring, 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.

◆ create_geometrycollection()

Geometrycollection * gis::Geometrycollection::create_geometrycollection ( Coordinate_system  coordinate_system)
static

Creates a subclass from a Coordinate_system.

Parameters
[in]coordinate_systemCoordinate system to create a geometrycollection for
Returns
A pointer to a Geometrycollection that caller must free when it is done with it.

◆ CreateGeometrycollection()

static Geometrycollection* gis::Geometrycollection::CreateGeometrycollection ( Coordinate_system  coordinate_system)
static

Creates a subclass of Geometrycollection from a Coordinate_system.

Parameters
[in]coordinate_systemCoordinate system to create a Geometrycollection for.
Returns
A pointer to a Geometrycollection that caller must free when it is done with it.

◆ empty()

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

◆ front() [1/2]

◆ front() [2/2]

◆ operator[]() [1/2]

◆ operator[]() [2/2]

◆ pop_front()

◆ 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 files: