Rosetta 3.3
|
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. | |
static void | add (KeyP const &key_p, Create create) |
Add a Product to the pointer registry. | |
static void | add (KeyFxn key_fxn, Create create) |
Add a Product to the function registry. | |
static void | remove (Key const &key) |
Remove a Product from the registry. | |
static void | remove (KeyP const &key_p) |
Remove a Product from the pointer registry. | |
static void | remove (KeyFxn key_fxn) |
Remove a Product from the function registry. | |
static bool | has (Key const &key) |
Has a Product with key? | |
static ProductP | create (Key const &key) |
Create a Product from key. | |
static ProductP | create (Key const &key, Arg &arg) |
Create a Product from key and 1 argument. |
Pluggable factory.
typedef Product::FactoryArg utility::factory::Factory< P >::Arg |
typedef Product::FactoryCreate utility::factory::Factory< P >::Create |
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 |
static void utility::factory::Factory< P >::add | ( | Key const & | key, |
Create | create | ||
) | [inline, static] |
Add a Product to the registry.
Referenced by utility::factory::Registrant< P >::Registrant().
static void utility::factory::Factory< P >::add | ( | KeyP const & | key_p, |
Create | create | ||
) | [inline, static] |
Add a Product to the pointer registry.
static void utility::factory::Factory< P >::add | ( | KeyFxn | key_fxn, |
Create | create | ||
) | [inline, static] |
Add a Product to the function registry.
static ProductP utility::factory::Factory< P >::create | ( | Key const & | key, |
Arg & | arg | ||
) | [inline, static] |
Create a Product from key and 1 argument.
static ProductP utility::factory::Factory< P >::create | ( | Key const & | key | ) | [inline, static] |
Create a Product from key.
static bool utility::factory::Factory< P >::has | ( | Key const & | key | ) | [inline, static] |
Has a Product with key?
static void utility::factory::Factory< P >::remove | ( | Key const & | key | ) | [inline, static] |
Remove a Product from the registry.
References key.
static void utility::factory::Factory< P >::remove | ( | KeyP const & | key_p | ) | [inline, static] |
Remove a Product from the pointer registry.
static void utility::factory::Factory< P >::remove | ( | KeyFxn | key_fxn | ) | [inline, static] |
Remove a Product from the function registry.