SFCGAL  2.3.0
Public Member Functions | Protected Member Functions | List of all members
SFCGAL::MultiPolygon Class Reference

A MultiPolygon in SFA. More...

#include <MultiPolygon.h>

Inherits SFCGAL::GeometryImpl< Derived, Base >.

Public Member Functions

 MultiPolygon ()
 Empty MultiPolygon constructor. More...
 
 MultiPolygon (MultiPolygon const &other)
 Copy constructor. More...
 
auto operator= (MultiPolygon other) -> MultiPolygon &
 assign operator More...
 
 ~MultiPolygon () override
 destructor More...
 
auto geometryType () const -> std::string override
 Get the geometry type as string. More...
 
auto geometryTypeId () const -> GeometryType override
 Get the geometry type identifier. More...
 
Polygon & polygonN (const size_t &n)
 returns the n-th Geometry as a Polygon More...
 
const Polygon & polygonN (const size_t &n) const
 returns the n-th Geometry as a Polygon More...
 
void accept (GeometryVisitor &visitor) override
 Accept a geometry visitor. More...
 
void accept (ConstGeometryVisitor &visitor) const override
 Accept a const geometry visitor. More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer. More...
 

Protected Member Functions

bool isAllowed (Geometry const &geometry) override
 Check if geometry is allowed in this collection. More...
 

Detailed Description

A MultiPolygon in SFA.

@ŧodo add polygon() etc.

Constructor & Destructor Documentation

SFCGAL::MultiPolygon::MultiPolygon ( )
default

Empty MultiPolygon constructor.

SFCGAL::MultiPolygon::MultiPolygon ( MultiPolygon const &  other)
default

Copy constructor.

Parameters
otherThe multi-polygon to copy from
SFCGAL::MultiPolygon::~MultiPolygon ( )
overridedefault

destructor

Member Function Documentation

void SFCGAL::MultiPolygon::accept ( GeometryVisitor &  visitor)
override

Accept a geometry visitor.

Parameters
visitorVisitor to accept
void SFCGAL::MultiPolygon::accept ( ConstGeometryVisitor &  visitor) const
override

Accept a const geometry visitor.

Parameters
visitorConst visitor to accept
auto SFCGAL::MultiPolygon::geometryType ( ) const -> std::string
override

Get the geometry type as string.

Returns
"MultiPolygon"
auto SFCGAL::MultiPolygon::geometryTypeId ( ) const -> GeometryType
override

Get the geometry type identifier.

Returns
TYPE_MULTIPOLYGON
auto SFCGAL::MultiPolygon::isAllowed ( Geometry const &  geometry)
overrideprotected

Check if geometry is allowed in this collection.

Parameters
geometryGeometry to test
Returns
true if geometry is a Polygon
auto SFCGAL::MultiPolygon::operator= ( MultiPolygon  other) -> MultiPolygon &

assign operator

Parameters
otherThe multi-polygon to assign from
Returns
Reference to this multi-polygon
Polygon& SFCGAL::MultiPolygon::polygonN ( const size_t &  n)
inline

returns the n-th Geometry as a Polygon

Parameters
nThe index of the polygon to get
Returns
Reference to the nth polygon
const Polygon& SFCGAL::MultiPolygon::polygonN ( const size_t &  n) const
inline

returns the n-th Geometry as a Polygon

Parameters
nThe index of the polygon to get
Returns
Const reference to the nth polygon
template<class Archive >
void SFCGAL::MultiPolygon::serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serializer.

Parameters
arArchive for serialization