Omnidome
Fulldome Mapping Software Toolkit
|
The central factory class. More...
#include <factory.hpp>
Public Types | |
typedef INTERFACE | interface_type |
Typedef for our abstract interface. More... | |
typedef factory < interface_type, TYPEINFO, ARGS...> | type |
Typedef for this factory type. More... | |
template<typename T > | |
using | typeinfo_type = TYPEINFO< T > |
Template alias for typeinfo type. More... | |
typedef typeinfo_type < interface_type > ::typeid_type | key_type |
Get key type from typeinfo struct. More... | |
typedef std::function < interface_type *(ARGS...)> | constructor_type |
Constructor function type. More... | |
typedef std::unordered_map < key_type, constructor_type > | class_map_type |
Internal type of map for storing ids. More... | |
template<typename T > | |
using | registrar_type = registrar< T, type, ARGS...> |
Alias template for registar. More... | |
Static Public Member Functions | |
static bool | exists (const key_type &_key) |
Checks if class with element id is registered. More... | |
template<typename T > | |
static void | reg (const key_type &_key) |
Registers class with custom key. More... | |
template<typename T > | |
static void | reg () |
Registers class by getting key from registrar's type id. More... | |
static void | unreg (const key_type &_key) |
Unregisters class with custom key. More... | |
template<typename T > | |
static void | unreg () |
Unregisters class by getting key from registrar. More... | |
static interface_type * | create (const key_type &_key, const ARGS &..._args) |
Instantiates an object of the class by id and constructor arguments. More... | |
static class_map_type const & | classes () |
Gives readonly access to registered classes. More... | |
Static Private Member Functions | |
template<typename T > | |
static void | key_type_check () |
Checks if key types are the same. More... | |
static class_map_type & | private_classes () |
The central factory class.
INTERFACE | Typename of the abstract interface |
TYPEINFO | Template template parameter for the typeinfo |
...ARGS | Template parameter which comply to the constructor signature of the interface |
typedef std::unordered_map<key_type,constructor_type> boostx::factory< INTERFACE, TYPEINFO, ARGS >::class_map_type |
Internal type of map for storing ids.
typedef std::function<interface_type*(ARGS...)> boostx::factory< INTERFACE, TYPEINFO, ARGS >::constructor_type |
Constructor function type.
typedef INTERFACE boostx::factory< INTERFACE, TYPEINFO, ARGS >::interface_type |
Typedef for our abstract interface.
typedef typeinfo_type<interface_type>::typeid_type boostx::factory< INTERFACE, TYPEINFO, ARGS >::key_type |
Get key type from typeinfo struct.
using boostx::factory< INTERFACE, TYPEINFO, ARGS >::registrar_type = registrar<T,type,ARGS...> |
Alias template for registar.
typedef factory<interface_type,TYPEINFO,ARGS...> boostx::factory< INTERFACE, TYPEINFO, ARGS >::type |
Typedef for this factory type.
using boostx::factory< INTERFACE, TYPEINFO, ARGS >::typeinfo_type = TYPEINFO<T> |
Template alias for typeinfo type.
|
inlinestatic |
Gives readonly access to registered classes.
|
inlinestatic |
Instantiates an object of the class by id and constructor arguments.
|
inlinestatic |
Checks if class with element id is registered.
|
inlinestaticprivate |
Checks if key types are the same.
|
inlinestaticprivate |
|
inlinestatic |
Registers class with custom key.
|
inlinestatic |
Registers class by getting key from registrar's type id.
|
inlinestatic |
Unregisters class with custom key.
|
inlinestatic |
Unregisters class by getting key from registrar.