RSC  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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,
CreateFunction
ImplMap
typedef base::ImplMap ImplMapBase
typedef base::ImplMapProxy ImplMapBaseProxy
- 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.
const ImplMapBaseProxyimplsBase () const throw ()
 Return a container-like object holding all registered implementations.
ImplMapProxyimpls () throw ()
 Return a container-like object holding all registered implementations.
const ImplMapProxyimpls () const throw ()
 Return a container-like object holding all registered implementations.
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.
- Static Public Member Functions inherited from rsc::patterns::Singleton< T >
static T & getInstance ()
 Retrieve the singleton instance, creating it if necessary.
static void killInstance ()
 This function can be used to make sure the instance is deleted at a particular time.
- 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: