Rosetta
|
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 | |
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< P >::Arg |
typedef Product::FactoryCreate utility::factory::Factory< P >::Create |
|
private |
typedef Product::FactoryKey utility::factory::Factory< P >::Key |
typedef Product::FactoryKeyFxn utility::factory::Factory< P >::KeyFxn |
typedef Product::FactoryKeyP utility::factory::Factory< P >::KeyP |
typedef P utility::factory::Factory< P >::Product |
typedef Product::FactoryProductP utility::factory::Factory< P >::ProductP |
|
private |
|
private |
|
inlineprivatedefault |
Default constructor.
|
inlinestatic |
Add a Product to the registry.
References utility::factory::Factory< P >::create(), subloop_histogram::key, and utility::factory::Factory< P >::registry().
Referenced by job_manager.MoveStatsWindow::__init__(), pyrosetta.bindings.pose.ResidueLabelAccessor::discard(), and utility::factory::Registrant< P >::Registrant().
|
inlinestatic |
Add a Product to the function registry.
References utility::factory::Factory< P >::create(), and utility::factory::Factory< P >::fxn_registry().
Referenced by job_manager.MoveStatsWindow::__init__(), and pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
|
inlinestatic |
Add a Product to the pointer registry.
References utility::factory::Factory< P >::create(), and utility::factory::Factory< P >::ptr_registry().
Referenced by job_manager.MoveStatsWindow::__init__(), and pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
|
inlinestatic |
Create a Product from key.
References debug_assert, subloop_histogram::key, test.G200_Module_Region::reg, and utility::factory::Factory< P >::registry().
Referenced by utility::factory::Factory< P >::add().
|
inlinestatic |
Create a Product from key and 1 argument.
References arg(), debug_assert, subloop_histogram::key, test.G200_Module_Region::reg, and utility::factory::Factory< P >::registry().
|
inlinestaticprivate |
Key function registry.
Referenced by utility::factory::Factory< P >::add(), utility::factory::Factory< P >::fxn_registry_transfer(), and utility::factory::Factory< P >::remove().
|
inlinestaticprivate |
Transfer key function registry to key registry.
References test.T009_Exceptions::e, utility::factory::Factory< P >::fxn_registry(), create_a3b_hbs::i, and test.G200_Module_Region::reg.
Referenced by utility::factory::Factory< P >::registry().
|
inlinestatic |
Has a Product with key?
References subloop_histogram::key, test.G200_Module_Region::reg, and utility::factory::Factory< P >::registry().
|
inlinestaticprivate |
Key pointer registry.
Referenced by utility::factory::Factory< P >::add(), utility::factory::Factory< P >::ptr_registry_transfer(), and utility::factory::Factory< P >::remove().
|
inlinestaticprivate |
Transfer key pointer registry to key registry.
References test.T009_Exceptions::e, create_a3b_hbs::i, utility::factory::Factory< P >::ptr_registry(), and test.G200_Module_Region::reg.
Referenced by utility::factory::Factory< P >::registry().
|
inlinestaticprivate |
Key registry.
References utility::factory::Factory< P >::fxn_registry_transfer(), and utility::factory::Factory< P >::ptr_registry_transfer().
Referenced by utility::factory::Factory< P >::add(), utility::factory::Factory< P >::create(), utility::factory::Factory< P >::has(), and utility::factory::Factory< P >::remove().
|
inlinestatic |
Remove a Product from the registry.
References subloop_histogram::key, and utility::factory::Factory< P >::registry().
|
inlinestatic |
Remove a Product from the function registry.
References utility::factory::Factory< P >::fxn_registry().
|
inlinestatic |
Remove a Product from the pointer registry.
References utility::factory::Factory< P >::ptr_registry().