Geogram
Version 1.9.1
A programming library of geometric algorithms
|
Factory for types with one constructor argument. More...
#include <geogram/basic/factory.h>
Static Public Member Functions | |
static Type * | create_object (const std::string &name, const Param1 ¶m1) |
Creates a new object with parameter(s). More... | |
Static Public Member Functions inherited from GEO::Factory< FactoryCreator1< Type, Param1 > > | |
static void | register_creator (const std::string &name) |
Registers a creator. More... | |
static CreatorType | find_creator (const std::string &name) |
Finds a creator by name. More... | |
static void | list_creators (std::vector< std::string > &names) |
Lists all registered creators. More... | |
static bool | has_creator (const std::string &name) |
Tests whether the factory has a creator. More... | |
Static Public Member Functions inherited from GEO::Counted | |
static void | ref (const Counted *counted) |
Increments the reference count. More... | |
static void | unref (const Counted *counted) |
Decrements the reference count. More... | |
Additional Inherited Members | |
Public Types inherited from GEO::Factory< FactoryCreator1< Type, Param1 > > | |
typedef FactoryCreator::CreatorType | CreatorType |
Public Member Functions inherited from GEO::Counted | |
void | ref () const |
Increments the reference count. More... | |
void | unref () const |
Decrements the reference count. More... | |
bool | is_shared () const |
Check if the object is shared. More... | |
int | nb_refs () const |
Gets the number of references that point to this object. More... | |
Protected Member Functions inherited from GEO::Factory< FactoryCreator1< Type, Param1 > > | |
~Factory () override | |
Factory destructor. | |
Protected Member Functions inherited from GEO::Counted | |
Counted () | |
Creates a reference counted object. More... | |
virtual | ~Counted () |
Destroys a reference counted object. More... | |
Factory for types with one constructor argument.
This implements a Factory to create objects with no constructor arguments.
Type | base type of the created objects |
Param1 | type of the constructor argument |
|
inlinestatic |
Creates a new object with parameter(s).
This creates a new object using the creator function bound to the specified user-defined name
.
[in] | name | specifies which kind of object to create |
[in] | param1 | parameter passed to the object constructor |
a | pointer to a new object is name is associated to a creator in this Factory |
a | null pointer otherwise. |