RSC  0.16.0
rsc::patterns::SingletonFactory< Key, Interface > Class Template Reference

A factory of which at most one instance exists at any time. More...

#include <Factory.h>

Inheritance diagram for rsc::patterns::SingletonFactory< Key, Interface >:
Inheritance graph
Collaboration diagram for rsc::patterns::SingletonFactory< Key, Interface >:
Collaboration graph

Protected Member Functions

 SingletonFactory ()
 
- Protected Member Functions inherited from rsc::patterns::Factory< Key, Interface >
virtual void register_ (const Key &key, const CreateFunction &create_function_)
 
virtual void unregister (const Key &key)
 

Friends

class Singleton< SingletonFactory< Key, Interface > >
 

Additional Inherited Members

- Public Types inherited from rsc::patterns::Factory< Key, Interface >
typedef FactoryBase< Key > base
 
typedef base::KeyType KeyType
 
typedef Interface InterfaceType
 
typedef boost::function1< InterfaceType *, const runtime::Properties & > CreateFunction
 
typedef std::map< Key, CreateFunctionImplMap
 
typedef base::ImplMap ImplMapBase
 
typedef base::ImplMapProxy ImplMapBaseProxy
 
- Public Types inherited from rsc::patterns::FactoryBase< Key >
typedef Key KeyType
 
typedef boost::function1< void *, const runtime::Properties & > CreateFunction
 
typedef std::pair< const std::type_info *, void * > type_and_storage
 
typedef std::map< Key, CreateFunctionImplMap
 
- Public Member Functions inherited from rsc::patterns::Singleton< T >
virtual ~Singleton ()
 
- Public Member Functions inherited from rsc::patterns::Factory< Key, Interface >
 Factory ()
 
virtual ~Factory ()
 
const std::type_info & GetInterfaceType () const throw ()
 Return the type information of the interface type of the factory. More...
 
const ImplMapBaseProxyimplsBase () const throw ()
 Return a container-like object holding all registered implementations. More...
 
ImplMapProxyimpls () throw ()
 Return a container-like object holding all registered implementations. More...
 
const ImplMapProxyimpls () const throw ()
 Return a container-like object holding all registered implementations. More...
 
FactoryBase< Key >::type_and_storage createBase (const Key &key, const runtime::Properties &properties_=runtime::Properties())
 
Interface * createInst (const Key &key, const runtime::Properties &properties_=runtime::Properties())
 Create and return an instance of the implementation designated by key. More...
 
- Static Public Member Functions inherited from rsc::patterns::Singleton< T >
static T & getInstance ()
 Retrieve the singleton instance, creating it if necessary. More...
 
static void killInstance ()
 This function can be used to make sure the instance is deleted at a particular time. More...
 
- Protected Attributes inherited from rsc::patterns::Factory< Key, Interface >
ImplMapBase impl_map_base_
 
ImplMapBaseProxy impl_map_base_proxy_
 
ImplMap impl_map_
 
ImplMapProxy impl_map_proxy_
 

Detailed Description

template<typename Key, typename Interface>
class rsc::patterns::SingletonFactory< Key, Interface >

A factory of which at most one instance exists at any time.

Definition at line 246 of file Factory.h.

Constructor & Destructor Documentation

template<typename Key , typename Interface >
rsc::patterns::SingletonFactory< Key, Interface >::SingletonFactory ( )
protected

Definition at line 385 of file Factory.h.

Friends And Related Function Documentation

template<typename Key , typename Interface >
friend class Singleton< SingletonFactory< Key, Interface > >
friend

Definition at line 248 of file Factory.h.


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