Sirikata
Public Types | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes
Sirikata::FactoryImpl< T, Ftype > Class Template Reference

#include <Factory.hpp>

Inheritance diagram for Sirikata::FactoryImpl< T, Ftype >:
Collaboration diagram for Sirikata::FactoryImpl< T, Ftype >:

List of all members.

Public Types

typedef std::list< String > ConstructorNameList

Public Member Functions

 FactoryImpl ()
bool unregisterConstructor (const String &name)
bool registerConstructor (const String &name, const Ftype &constructor, bool isDefault=false)
const String & getDefault () const
bool hasConstructor (const String &name) const
ConstructorNameList getNames () const
const Ftype & getConstructorOrDefault (const String &name) const
const Ftype & getConstructor (const String &name) const
const Ftype & getDefaultConstructor () const

Private Types

typedef
std::tr1::unordered_map
< String, Ftype > 
ConstructorMap

Static Private Member Functions

template<class U >
static U * noop (U *)
template<class U >
static U noop (const U &)
static T staticNoop ()

Private Attributes

ConstructorMap mConstructors
Ftype mNoop
String mDefault

template<class T, class Ftype>
class Sirikata::FactoryImpl< T, Ftype >


Member Typedef Documentation

template<class T, class Ftype>
typedef std::tr1::unordered_map<String,Ftype> Sirikata::FactoryImpl< T, Ftype >::ConstructorMap [private]
template<class T, class Ftype>
typedef std::list<String> Sirikata::FactoryImpl< T, Ftype >::ConstructorNameList

Constructor & Destructor Documentation

template<class T, class Ftype>
Sirikata::FactoryImpl< T, Ftype >::FactoryImpl ( ) [inline]

Member Function Documentation

template<class T, class Ftype>
const Ftype& Sirikata::FactoryImpl< T, Ftype >::getConstructor ( const String &  name) const [inline]
template<class T, class Ftype>
const Ftype& Sirikata::FactoryImpl< T, Ftype >::getConstructorOrDefault ( const String &  name) const [inline]
template<class T, class Ftype>
const String& Sirikata::FactoryImpl< T, Ftype >::getDefault ( ) const [inline]
template<class T, class Ftype>
const Ftype& Sirikata::FactoryImpl< T, Ftype >::getDefaultConstructor ( ) const [inline]
template<class T, class Ftype>
ConstructorNameList Sirikata::FactoryImpl< T, Ftype >::getNames ( ) const [inline]
template<class T, class Ftype>
bool Sirikata::FactoryImpl< T, Ftype >::hasConstructor ( const String &  name) const [inline]
template<class T, class Ftype>
template<class U >
static U Sirikata::FactoryImpl< T, Ftype >::noop ( const U &  ) [inline, static, private]
template<class T, class Ftype>
template<class U >
static U* Sirikata::FactoryImpl< T, Ftype >::noop ( U *  ) [inline, static, private]
template<class T, class Ftype>
bool Sirikata::FactoryImpl< T, Ftype >::registerConstructor ( const String &  name,
const Ftype &  constructor,
bool  isDefault = false 
) [inline]
template<class T, class Ftype>
static T Sirikata::FactoryImpl< T, Ftype >::staticNoop ( ) [inline, static, private]
template<class T, class Ftype>
bool Sirikata::FactoryImpl< T, Ftype >::unregisterConstructor ( const String &  name) [inline]

Member Data Documentation

template<class T, class Ftype>
ConstructorMap Sirikata::FactoryImpl< T, Ftype >::mConstructors [private]
template<class T, class Ftype>
String Sirikata::FactoryImpl< T, Ftype >::mDefault [private]
template<class T, class Ftype>
Ftype Sirikata::FactoryImpl< T, Ftype >::mNoop [private]

The documentation for this class was generated from the following file: