![]() |
Rosetta
2016.11
|
Pluggable factory. More...
#include <Factory.hh>
Public Types | |
typedef P | Product |
typedef Product::FactoryKey | Key |
typedef Product::FactoryKeyP | KeyP |
typedef Product::FactoryKeyFxn | KeyFxn |
typedef Product::FactoryProductP | ProductP |
typedef Product::FactoryArg | Arg |
typedef Product::FactoryCreate | Create |
Static Public Member Functions | |
static void | add (Key const &key, Create create) |
Add a Product to the registry. More... | |
static void | add (KeyP const &key_p, Create create) |
Add a Product to the pointer registry. More... | |
static void | add (KeyFxn key_fxn, Create create) |
Add a Product to the function registry. More... | |
static void | remove (Key const &key) |
Remove a Product from the registry. More... | |
static void | remove (KeyP const &key_p) |
Remove a Product from the pointer registry. More... | |
static void | remove (KeyFxn key_fxn) |
Remove a Product from the function registry. More... | |
static bool | has (Key const &key) |
Has a Product with key? More... | |
static ProductP | create (Key const &key) |
Create a Product from key. More... | |
static ProductP | create (Key const &key, Arg &arg) |
Create a Product from key and 1 argument. More... | |
Private Types | |
typedef std::map< Key, Create > | Registry |
typedef std::map< KeyP, Create > | PtrRegistry |
typedef std::map< KeyFxn, Create > | FxnRegistry |
Private Member Functions | |
Factory () | |
Default constructor. More... | |
Static Private Member Functions | |
static Registry & | registry () |
Key registry. More... | |
static PtrRegistry & | ptr_registry () |
Key pointer registry. More... | |
static FxnRegistry & | fxn_registry () |
Key function registry. More... | |
static void | ptr_registry_transfer (Registry ®) |
Transfer key pointer registry to key registry. More... | |
static void | fxn_registry_transfer (Registry ®) |
Transfer key function registry to key registry. More... | |
Pluggable factory.
typedef Product::FactoryArg utility::factory::Factory< typename >::Arg |
typedef Product::FactoryCreate utility::factory::Factory< typename >::Create |
|
private |
typedef Product::FactoryKey utility::factory::Factory< typename >::Key |
typedef Product::FactoryKeyFxn utility::factory::Factory< typename >::KeyFxn |
typedef Product::FactoryKeyP utility::factory::Factory< typename >::KeyP |
typedef P utility::factory::Factory< typename >::Product |
typedef Product::FactoryProductP utility::factory::Factory< typename >::ProductP |
|
private |
|
private |
|
inlineprivate |
Default constructor.
|
inlinestatic |
Add a Product to the registry.
References utility::factory::Factory< typename >::registry().
Referenced by utility::factory::Registrant< typename >::Registrant().
|
inlinestatic |
Add a Product to the pointer registry.
References utility::factory::Factory< typename >::ptr_registry().
|
inlinestatic |
Add a Product to the function registry.
References utility::factory::Factory< typename >::fxn_registry().
|
inlinestatic |
Create a Product from key.
References debug_assert, test.G200_Module_Region::reg, and utility::factory::Factory< typename >::registry().
|
inlinestatic |
Create a Product from key and 1 argument.
References debug_assert, test.G200_Module_Region::reg, and utility::factory::Factory< typename >::registry().
|
inlinestaticprivate |
Key function registry.
Referenced by utility::factory::Factory< typename >::add(), utility::factory::Factory< typename >::fxn_registry_transfer(), and utility::factory::Factory< typename >::remove().
|
inlinestaticprivate |
Transfer key function registry to key registry.
References utility::factory::Factory< typename >::fxn_registry().
Referenced by utility::factory::Factory< typename >::registry().
|
inlinestatic |
Has a Product with key?
References test.G200_Module_Region::reg, and utility::factory::Factory< typename >::registry().
|
inlinestaticprivate |
Key pointer registry.
Referenced by utility::factory::Factory< typename >::add(), utility::factory::Factory< typename >::ptr_registry_transfer(), and utility::factory::Factory< typename >::remove().
|
inlinestaticprivate |
Transfer key pointer registry to key registry.
References utility::factory::Factory< typename >::ptr_registry().
Referenced by utility::factory::Factory< typename >::registry().
|
inlinestaticprivate |
Key registry.
References utility::factory::Factory< typename >::fxn_registry_transfer(), and utility::factory::Factory< typename >::ptr_registry_transfer().
Referenced by utility::factory::Factory< typename >::add(), utility::factory::Factory< typename >::create(), utility::factory::Factory< typename >::has(), and utility::factory::Factory< typename >::remove().
|
inlinestatic |
Remove a Product from the registry.
References key, and utility::factory::Factory< typename >::registry().
|
inlinestatic |
Remove a Product from the pointer registry.
References utility::factory::Factory< typename >::ptr_registry().
|
inlinestatic |
Remove a Product from the function registry.
References utility::factory::Factory< typename >::fxn_registry().