Rosetta Utilities  2014.35
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
utility::Factory< T > Class Template Reference

#include <Factory.hh>

Public Member Functions

 ~Factory ()
 
TSP from_string (std::string const &name)
 
bool has_string (std::string const &name)
 
void register_string (std::string const &name, Creator m)
 

Static Public Member Functions

static Factoryget_instance ()
 

Private Types

typedef boost::scoped_ptr
< Factory< T > > 
FactorySCP
 
typedef boost::shared_ptr< T > TSP
 
typedef boost::function< TSP() > Creator
 
typedef std::map< std::string,
Creator
CreatorMap
 
typedef CreatorMap::const_iterator cmap_itr
 

Private Member Functions

 Factory ()
 

Private Attributes

CreatorMap cmap_
 

Static Private Attributes

static FactorySCP factory_
 

Member Typedef Documentation

template<class T>
typedef boost::function< TSP () > utility::Factory< T >::Creator
private
template<class T>
typedef std::map<std::string, Creator> utility::Factory< T >::CreatorMap
private
template<class T>
typedef boost::scoped_ptr< Factory<T> > utility::Factory< T >::FactorySCP
private
template<class T>
typedef boost::shared_ptr< T > utility::Factory< T >::TSP
private

Constructor & Destructor Documentation

template<class T>
utility::Factory< T >::Factory ( )
inlineprivate
template<class T>
utility::Factory< T >::~Factory ( )
inline

Member Function Documentation

template<class T >
Factory< T >::TSP utility::Factory< T >::from_string ( std::string const &  name)
template<class T >
Factory< T > * utility::Factory< T >::get_instance ( )
static
template<class T >
bool utility::Factory< T >::has_string ( std::string const &  name)
template<class T >
void utility::Factory< T >::register_string ( std::string const &  name,
Creator  m 
)

Member Data Documentation

template<class T>
CreatorMap utility::Factory< T >::cmap_
private
template<class T>
Factory< T >::FactorySCP utility::Factory< T >::factory_
staticprivate

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