RSC
0.16.0
|
A factory of which at most one instance exists at any time. More...
#include <Factory.h>
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, CreateFunction > | ImplMap |
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, CreateFunction > | ImplMap |
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 ImplMapBaseProxy & | implsBase () const throw () |
Return a container-like object holding all registered implementations. More... | |
ImplMapProxy & | impls () throw () |
Return a container-like object holding all registered implementations. More... | |
const ImplMapProxy & | impls () 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_ |
A factory of which at most one instance exists at any time.
|
protected |
|
friend |