Graphite
Version 3
An experimental 3D geometry processing program
|
Factory for types without constructor arguments. More...
#include <geogram/basic/factory.h>
Static Public Member Functions | |
static Type * | create_object (const std::string &name) |
Creates a new object. More... | |
Static Public Member Functions inherited from GEO::Factory< FactoryCreator0< Type > > | |
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< FactoryCreator0< Type > > | |
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< FactoryCreator0< Type > > | |
~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 without constructor arguments.
This implements a Factory to create objects with no constructor arguments.
Type | base type of the created objects |
|
inlinestatic |
Creates a new object.
This creates a new object using the creator function bound to the specified user-defined name
.
[in] | name | specifies wihch kind of object to create |
a | pointer to a new object is name is associated to a creator in this Factory |
a | null pointer otherwise. |