SFCGAL 2.3.0
SFCGAL::tools::Registry Class Reference

Registry for dynamic information about SFCGAL library. More...

#include <Registry.h>

Public Types

using prototype_iterator
 Iterator type for prototypes.
using const_prototype_iterator
 Const iterator type for prototypes.

Public Member Functions

 ~Registry ()=default
 destructor
 Registry (const Registry &)=delete
auto operator= (const Registry &) -> Registry &=delete
void addPrototype (const Geometry &g)
 Register a new Geometry type.
std::vector< std::string > getGeometryTypes () const
 Returns the list of the geometry types.
auto newGeometryByTypeName (const std::string &geometryTypeName) const -> std::unique_ptr< Geometry >
 Returns a new instance of the given geometryTypeName.
auto newGeometryByTypeId (int typeId) const -> std::unique_ptr< Geometry >
 Returns a new instance of the given geometryType.
auto begin () -> prototype_iterator
 Returns a mutable iterator to the beginning of the registry collection.
auto begin () const -> const_prototype_iterator
 Returns a const iterator to the beginning of the registry collection.
auto end () -> prototype_iterator
 Returns a mutable iterator to the end of the registry collection.
auto end () const -> const_prototype_iterator
 Returns a const iterator to the end of the registry collection.

Static Public Member Functions

static Registry & instance ()
 Returns the instance of the registry.

Detailed Description

Registry for dynamic information about SFCGAL library.

Member Typedef Documentation

◆ const_prototype_iterator

Initial value:
const_iterator
Iterator adapter that dereferences unique_ptr elements automatically.
Definition DereferenceIterator.h:22

Const iterator type for prototypes.

◆ prototype_iterator

Initial value:

Iterator type for prototypes.

Constructor & Destructor Documentation

◆ ~Registry()

SFCGAL::tools::Registry::~Registry ( )
default

destructor

◆ Registry()

SFCGAL::tools::Registry::Registry ( const Registry & )
delete

Member Function Documentation

◆ addPrototype()

void SFCGAL::tools::Registry::addPrototype ( const Geometry & g)

Register a new Geometry type.

Parameters
gThe geometry prototype to register

◆ begin() [1/2]

auto SFCGAL::tools::Registry::begin ( ) -> prototype_iterator
inline

Returns a mutable iterator to the beginning of the registry collection.

Returns
prototype_iterator Iterator to the first element.

◆ begin() [2/2]

auto SFCGAL::tools::Registry::begin ( ) const -> const_prototype_iterator
inlinenodiscard

Returns a const iterator to the beginning of the registry collection.

Returns
const_prototype_iterator Const iterator to the first element.

◆ end() [1/2]

auto SFCGAL::tools::Registry::end ( ) -> prototype_iterator
inline

Returns a mutable iterator to the end of the registry collection.

Returns
prototype_iterator Iterator pointing past the last element.

◆ end() [2/2]

auto SFCGAL::tools::Registry::end ( ) const -> const_prototype_iterator
inlinenodiscard

Returns a const iterator to the end of the registry collection.

Returns
const_prototype_iterator Const iterator pointing past the last element.

◆ getGeometryTypes()

auto SFCGAL::tools::Registry::getGeometryTypes ( ) const

Returns the list of the geometry types.

Returns
Vector of geometry type names

◆ instance()

auto SFCGAL::tools::Registry::instance ( )
static

Returns the instance of the registry.

Returns
Reference to the singleton registry instance

◆ newGeometryByTypeId()

auto SFCGAL::tools::Registry::newGeometryByTypeId ( int typeId) const -> std::unique_ptr< Geometry >
nodiscard

Returns a new instance of the given geometryType.

Parameters
typeIdThe geometry type ID
Returns
Pointer to new geometry instance

◆ newGeometryByTypeName()

auto SFCGAL::tools::Registry::newGeometryByTypeName ( const std::string & geometryTypeName) const -> std::unique_ptr< Geometry >
nodiscard

Returns a new instance of the given geometryTypeName.

Parameters
geometryTypeNameThe name of the geometry type
Returns
std::unique_ptr to new geometry instance

◆ operator=()

auto SFCGAL::tools::Registry::operator= ( const Registry & ) -> Registry &=delete
delete