MySQL 8.3.0
Source Code Documentation
gis::Cartesian_multipolygon Class Reference

A Cartesian 2d multipolygon. More...

#include <geometries_cs.h>

Inheritance diagram for gis::Cartesian_multipolygon:
[legend]

Public Types

typedef decltype(m_polygons) ::value_type value_type
 
typedef decltype(m_polygons) ::iterator iterator
 
typedef decltype(m_polygons) ::const_iterator const_iterator
 

Public Member Functions

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

Private Attributes

std::vector< Cartesian_polygon, Malloc_allocator< Cartesian_polygon > > m_polygons
 List of polygons in the collection. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gis::Multipolygon
static Multipolygoncreate_multipolygon (Coordinate_system coordinate_system)
 Creates a subclass of Multipolygon from a Coordinate_system. More...
 
- Static Public Member Functions inherited from gis::Geometrycollection
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 Cartesian 2d multipolygon.

Member Typedef Documentation

◆ const_iterator

◆ iterator

◆ value_type

Constructor & Destructor Documentation

◆ Cartesian_multipolygon()

gis::Cartesian_multipolygon::Cartesian_multipolygon ( )
inline

Member Function Documentation

◆ accept()

bool gis::Cartesian_multipolygon::accept ( Geometry_visitor v)
overridevirtual

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::Multipolygon.

◆ begin() [1/2]

const_iterator gis::Cartesian_multipolygon::begin ( void  ) const
inlinenoexcept

◆ begin() [2/2]

iterator gis::Cartesian_multipolygon::begin ( void  )
inlinenoexcept

◆ clear()

void gis::Cartesian_multipolygon::clear ( )
inlineoverridevirtualnoexcept

Removes all geometries from the geometrycollection.

Implements gis::Geometrycollection.

◆ clone()

Cartesian_multipolygon * gis::Cartesian_multipolygon::clone ( ) const
inlineoverridevirtual

Clone pattern to easily duplicate a Multipolygon.

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

Implements gis::Multipolygon.

◆ coordinate_system()

Coordinate_system gis::Cartesian_multipolygon::coordinate_system ( ) const
inlineoverridevirtual

Gets the coordinate system.

Returns
The coordinate system type.

Implements gis::Geometry.

◆ empty()

bool gis::Cartesian_multipolygon::empty ( ) const
overridevirtual

Checks if the collection is empty.

Return values
trueThe polygon is empty.
falseThe polygon is not empty.

Implements gis::Geometrycollection.

◆ end() [1/2]

const_iterator gis::Cartesian_multipolygon::end ( void  ) const
inlinenoexcept

◆ end() [2/2]

iterator gis::Cartesian_multipolygon::end ( void  )
inlinenoexcept

◆ front() [1/2]

const Cartesian_polygon & gis::Cartesian_multipolygon::front ( ) const
inlineoverridevirtual

Implements gis::Multipolygon.

◆ front() [2/2]

Cartesian_polygon & gis::Cartesian_multipolygon::front ( )
inlineoverridevirtual

Returns the first polygon of the Multipolygon.

Returns
First polygon of the Multipolygon

Implements gis::Multipolygon.

◆ is_empty()

bool gis::Cartesian_multipolygon::is_empty ( ) const
inlineoverridevirtual

Check if this is an empty geometry.

The definition of empty geometries is the one in SFA-CA (OGC 06-103r4, Sect. 6.1.2.2), i.e., an empty point set.

Note
This is different from the function "empty", which returns true if a geometry contains no subgeometries. E.g., a geometry collection may contain another geometry collection which is empty. In this case, the "empty" function would return false on the outermost geometry collection, while "is_empty" would return true.
Return values
trueThe geometry represents the empty point set.
falseThe geometry represent a non-empty point set.

Implements gis::Geometry.

◆ operator[]() [1/2]

const Geometry & gis::Cartesian_multipolygon::operator[] ( std::size_t  i) const
inlineoverridevirtual

◆ operator[]() [2/2]

Cartesian_polygon & gis::Cartesian_multipolygon::operator[] ( std::size_t  i)
inlineoverridevirtual

◆ pop_front()

void gis::Cartesian_multipolygon::pop_front ( )
inlineoverridevirtual

Removes a geometry from the front of the collection.

Implements gis::Geometrycollection.

◆ push_back() [1/2]

void gis::Cartesian_multipolygon::push_back ( const Geometry g)
overridevirtual

Adds a geometry to the collection.

Parameters
gThe geometry to add.

Implements gis::Geometrycollection.

◆ push_back() [2/2]

void gis::Cartesian_multipolygon::push_back ( Geometry &&  g)
overridevirtual

◆ resize()

void gis::Cartesian_multipolygon::resize ( std::size_t  count)
inlineoverridevirtual

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.

Implements gis::Geometrycollection.

◆ size()

std::size_t gis::Cartesian_multipolygon::size ( ) const
inlineoverridevirtual

Returns the size of the geometrycollection.

Returns
Number of geometries in the geometrycollection.

Implements gis::Geometrycollection.

Member Data Documentation

◆ m_polygons

std::vector<Cartesian_polygon, Malloc_allocator<Cartesian_polygon> > gis::Cartesian_multipolygon::m_polygons
private

List of polygons in the collection.


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