29 #include <boost/signals.hpp>
42 template<
typename Key,
typename Interface>
49 typedef boost::signal2<void, const std::string&, const CreateFunction&>
52 typedef boost::signal2<void, const std::string&, const CreateFunction&>
86 template<typename Key, typename Interface>
96 template<
typename Key,
typename Interface>
102 template<
typename Key,
typename Interface>
108 template<
typename Key,
typename Interface>
119 template<
typename Key,
typename Interface>
123 typename ImplMap::iterator it;
134 template<
typename Key,
typename Interface>
virtual void register_(const Key &key, const CreateFunction &create_function_)
A factory of which at most one instance exists at any time.
Objects of this class manage a family of named implementations of a particular interface.
virtual void unregister(const Key &key)
boost::function1< void *, const runtime::Properties & > CreateFunction
boost::signal2< void, const std::string &, const CreateFunction & > ImplRemovedSignal
void unregister(const Key &key)
An interface-independent factory interface, mainly used as a base class for more specific factories...
This template class implements the singleton pattern.
void register_(const Key &key, const CreateFunction &create_function_)
Factory< Key, Interface > base
base::CreateFunction CreateFunction
ImplRemovedSignal & signalImplRemoved()
Return the "implementation removed" signal.
ObservableSingletonFactory()
A specialized factory class objects of which emit signals when implementations are registered or unre...
ImplRemovedSignal signal_impl_removed_
ImplAddedSignal & signalImplAdded()
Return the "implementation added" signal.
ImplAddedSignal signal_impl_added_
An observable factory of which at most one instance exists at any time.
std::map< Key, CreateFunction > ImplMap
boost::signal2< void, const std::string &, const CreateFunction & > ImplAddedSignal