SFCGAL 2.3.0
SFCGAL::MultiPolygon Class Reference

A MultiPolygon in SFA. More...

#include <MultiPolygon.h>

Public Member Functions

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

Protected Member Functions

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

Detailed Description

A MultiPolygon in SFA.

@ŧodo add polygon() etc.

Constructor & Destructor Documentation

◆ MultiPolygon() [1/2]

SFCGAL::MultiPolygon::MultiPolygon ( )
default

Empty MultiPolygon constructor.

◆ MultiPolygon() [2/2]

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

Copy constructor.

Parameters
otherThe multi-polygon to copy from

◆ ~MultiPolygon()

SFCGAL::MultiPolygon::~MultiPolygon ( )
overridedefault

destructor

Member Function Documentation

◆ accept() [1/2]

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

Accept a const geometry visitor.

Parameters
visitorConst visitor to accept

◆ accept() [2/2]

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

Accept a geometry visitor.

Parameters
visitorVisitor to accept

◆ geometryType()

auto SFCGAL::MultiPolygon::geometryType ( ) const -> std::string
nodiscardoverride

Get the geometry type as string.

Returns
"MultiPolygon"

◆ geometryTypeId()

auto SFCGAL::MultiPolygon::geometryTypeId ( ) const -> GeometryType
nodiscardoverride

Get the geometry type identifier.

Returns
TYPE_MULTIPOLYGON

◆ isAllowed()

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

◆ operator=()

auto SFCGAL::MultiPolygon::operator= ( MultiPolygon other) -> MultiPolygon &

assign operator

Parameters
otherThe multi-polygon to assign from
Returns
Reference to this multi-polygon

◆ polygonN() [1/2]

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

◆ polygonN() [2/2]

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

◆ serialize()

template<class Archive>
void SFCGAL::MultiPolygon::serialize ( Archive & ar,
const unsigned int  )
inline

Serializer.

Parameters
arArchive for serialization