|
Geogram Version 1.9.7
A programming library of geometric algorithms
|
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. | |
Static Public Member Functions inherited from GEO::Factory< FactoryCreator0< Type > > | |
| static void | register_creator (const std::string &name) |
| Registers a creator. | |
| static CreatorType | find_creator (const std::string &name) |
| Finds a creator by name. | |
| static void | list_creators (std::vector< std::string > &names) |
| Lists all registered creators. | |
| static bool | has_creator (const std::string &name) |
| Tests whether the factory has a creator. | |
Static Public Member Functions inherited from GEO::Counted | |
| static void | ref (const Counted *counted) |
| Increments the reference count. | |
| static void | unref (const Counted *counted) |
| Decrements the reference count. | |
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. | |
| void | unref () const |
| Decrements the reference count. | |
| bool | is_shared () const |
| Check if the object is shared. | |
| int | nb_refs () const |
| Gets the number of references that point to this object. | |
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. | |
| virtual | ~Counted () |
| Destroys a reference counted object. | |
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. |