Sirikata
|
#include <FactoryWithOptions.hpp>
Public Member Functions | |
FactoryWithOptionsImpl () | |
bool | unregisterConstructor (const String &name) |
bool | hasConstructor (const String &name) const |
const String & | getDefault () const |
bool | registerConstructor (const String &name, const Ftype &constructor, const Otype &optionParser, bool defaultValue) |
const Otype & | getOptionParser (const String &name) const |
const Otype & | getDefaultOptionParser () const |
const Ftype & | getConstructor (const String &name) const |
const Ftype & | getDefaultConstructor () const |
Private Types | |
typedef std::tr1::function < OptionSet *(const String &)> | Otype |
typedef std::tr1::unordered_map < String, Otype > | OptionMap |
Static Private Member Functions | |
static OptionSet * | staticNop () |
Private Attributes | |
OptionMap | mOptionParsers |
Otype | mNop |
typedef std::tr1::unordered_map<String, Otype> Sirikata::FactoryWithOptionsImpl< T, Ftype >::OptionMap [private] |
typedef std::tr1::function<OptionSet*(const String&)> Sirikata::FactoryWithOptionsImpl< T, Ftype >::Otype [private] |
Sirikata::FactoryWithOptionsImpl< T, Ftype >::FactoryWithOptionsImpl | ( | ) | [inline] |
const Ftype& Sirikata::FactoryWithOptionsImpl< T, Ftype >::getConstructor | ( | const String & | name | ) | const [inline] |
Reimplemented from Sirikata::FactoryImpl< T, Ftype >.
Referenced by Sirikata::MasterPintoServerQuerierBase::connect(), Sirikata::FactoryWithOptionsImpl< T, std::tr1::function< T(A)> >::getConstructor(), Sirikata::TCPSpaceNetwork::getNewOutgoingStream(), Sirikata::ObjectHostConnectionManager::listen(), Sirikata::PintoManagerBase::PintoManagerBase(), and Sirikata::TCPSpaceNetwork::TCPSpaceNetwork().
const String& Sirikata::FactoryWithOptionsImpl< T, Ftype >::getDefault | ( | ) | const [inline] |
Reimplemented from Sirikata::FactoryImpl< T, Ftype >.
Referenced by Sirikata::FactoryWithOptionsImpl< T, std::tr1::function< T(A)> >::getDefault(), Sirikata::FactoryWithOptionsImpl< T, std::tr1::function< T(A)> >::getDefaultOptionParser(), and Sirikata::FactoryWithOptionsImpl< T, std::tr1::function< T(A)> >::getOptionParser().
const Ftype& Sirikata::FactoryWithOptionsImpl< T, Ftype >::getDefaultConstructor | ( | ) | const [inline] |
Reimplemented from Sirikata::FactoryImpl< T, Ftype >.
Referenced by Sirikata::FactoryWithOptionsImpl< T, std::tr1::function< T(A)> >::getDefaultConstructor().
const Otype& Sirikata::FactoryWithOptionsImpl< T, Ftype >::getDefaultOptionParser | ( | ) | const [inline] |
const Otype& Sirikata::FactoryWithOptionsImpl< T, Ftype >::getOptionParser | ( | const String & | name | ) | const [inline] |
Referenced by Sirikata::MasterPintoServerQuerierBase::connect(), Sirikata::FactoryWithOptionsImpl< T, std::tr1::function< T(A)> >::getDefaultOptionParser(), Sirikata::ObjectHostConnectionManager::listen(), Sirikata::ObjectHost::ObjectHost(), Sirikata::PintoManagerBase::PintoManagerBase(), Sirikata::SessionManager::SessionManager(), and Sirikata::TCPSpaceNetwork::TCPSpaceNetwork().
bool Sirikata::FactoryWithOptionsImpl< T, Ftype >::hasConstructor | ( | const String & | name | ) | const [inline] |
Reimplemented from Sirikata::FactoryImpl< T, Ftype >.
Referenced by Sirikata::FactoryWithOptionsImpl< T, std::tr1::function< T(A)> >::hasConstructor().
bool Sirikata::FactoryWithOptionsImpl< T, Ftype >::registerConstructor | ( | const String & | name, |
const Ftype & | constructor, | ||
const Otype & | optionParser, | ||
bool | defaultValue | ||
) | [inline] |
Referenced by init().
static OptionSet* Sirikata::FactoryWithOptionsImpl< T, Ftype >::staticNop | ( | ) | [inline, static, private] |
bool Sirikata::FactoryWithOptionsImpl< T, Ftype >::unregisterConstructor | ( | const String & | name | ) | [inline] |
Reimplemented from Sirikata::FactoryImpl< T, Ftype >.
Referenced by destroy().
Otype Sirikata::FactoryWithOptionsImpl< T, Ftype >::mNop [private] |
OptionMap Sirikata::FactoryWithOptionsImpl< T, Ftype >::mOptionParsers [private] |