RSC  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsc::patterns::ObservableFactory< Key, Interface > Class Template Reference

A specialized factory class objects of which emit signals when implementations are registered or unregistered. More...

#include <ObservableFactory.h>

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

Public Types

typedef base::CreateFunction CreateFunction
typedef boost::signal2< void,
const std::string &, const
CreateFunction & > 
ImplAddedSignal
typedef boost::signal2< void,
const std::string &, const
CreateFunction & > 
ImplRemovedSignal
- 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

ImplAddedSignalsignalImplAdded () throw ()
 Return the "implementation added" signal.
ImplRemovedSignalsignalImplRemoved () throw ()
 Return the "implementation removed" signal.
- 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.

Protected Types

typedef Factory< Key, Interface > base
typedef base::ImplMap ImplMap

Protected Member Functions

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

Protected Attributes

ImplAddedSignal signal_impl_added_
ImplRemovedSignal signal_impl_removed_
- 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::ObservableFactory< Key, Interface >

A specialized factory class objects of which emit signals when implementations are registered or unregistered.

Author
Jan Moringen jmori.nosp@m.nge@.nosp@m.techf.nosp@m.ak.u.nosp@m.ni-bi.nosp@m.elef.nosp@m.eld.d.nosp@m.e

Definition at line 43 of file ObservableFactory.h.

Member Typedef Documentation

template<typename Key, typename Interface>
typedef Factory<Key, Interface> rsc::patterns::ObservableFactory< Key, Interface >::base
protected

Definition at line 45 of file ObservableFactory.h.

template<typename Key, typename Interface>
typedef base::CreateFunction rsc::patterns::ObservableFactory< Key, Interface >::CreateFunction

Definition at line 47 of file ObservableFactory.h.

template<typename Key, typename Interface>
typedef boost::signal2<void, const std::string&, const CreateFunction&> rsc::patterns::ObservableFactory< Key, Interface >::ImplAddedSignal

Definition at line 50 of file ObservableFactory.h.

template<typename Key, typename Interface>
typedef base::ImplMap rsc::patterns::ObservableFactory< Key, Interface >::ImplMap
protected

Definition at line 67 of file ObservableFactory.h.

template<typename Key, typename Interface>
typedef boost::signal2<void, const std::string&, const CreateFunction&> rsc::patterns::ObservableFactory< Key, Interface >::ImplRemovedSignal

Definition at line 53 of file ObservableFactory.h.

Member Function Documentation

template<typename Key , typename Interface >
void rsc::patterns::ObservableFactory< Key, Interface >::register_ ( const Key &  key,
const CreateFunction create_function_ 
)
protected
Exceptions
std::invalid_argument

Definition at line 109 of file ObservableFactory.h.

References rsc::patterns::Factory< Key, Interface >::register_(), and rsc::patterns::ObservableFactory< Key, Interface >::signal_impl_added_.

Here is the call graph for this function:

template<typename Key , typename Interface >
ObservableFactory< Key, Interface >::ImplAddedSignal & rsc::patterns::ObservableFactory< Key, Interface >::signalImplAdded ( ) throw ()

Return the "implementation added" signal.

Definition at line 98 of file ObservableFactory.h.

References rsc::patterns::ObservableFactory< Key, Interface >::signal_impl_added_.

template<typename Key , typename Interface >
ObservableFactory< Key, Interface >::ImplRemovedSignal & rsc::patterns::ObservableFactory< Key, Interface >::signalImplRemoved ( ) throw ()

Return the "implementation removed" signal.

Definition at line 104 of file ObservableFactory.h.

References rsc::patterns::ObservableFactory< Key, Interface >::signal_impl_removed_.

template<typename Key , typename Interface >
void rsc::patterns::ObservableFactory< Key, Interface >::unregister ( const Key &  key)
protectedvirtual

Member Data Documentation

template<typename Key, typename Interface>
ImplAddedSignal rsc::patterns::ObservableFactory< Key, Interface >::signal_impl_added_
protected
template<typename Key, typename Interface>
ImplRemovedSignal rsc::patterns::ObservableFactory< Key, Interface >::signal_impl_removed_
protected

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