Singleton server. More...
#include <server.hh>
Private Types | |
typedef mutex_type::scoped_lock | lock_type |
typedef boost::recursive_mutex | mutex_type |
typedef std::map< std::string, dummy * > | single_map |
Private Member Functions | |
void | attach (std::string const &name, details::dummy_factory const &factory) |
bool | detach (std::string const &name) |
dummy * | get (std::string const &name) const |
server () | |
~server () | |
Static Private Member Functions | |
static server & | instance () |
Private Attributes | |
single_map | singletons |
Static Private Attributes | |
static mutex_type | sing_mtx |
static server * | the_instance = 0 |
Friends | |
class | utilmm::singleton::dummy |
Singleton server.
The central server for singleton instances.
typedef mutex_type::scoped_lock utilmm::singleton::server::lock_type [private] |
typedef boost::recursive_mutex utilmm::singleton::server::mutex_type [private] |
typedef std::map<std::string, dummy *> utilmm::singleton::server::single_map [private] |
server::server | ( | ) | [private] |
server::~server | ( | ) | [private] |
void server::attach | ( | std::string const & | name, |
details::dummy_factory const & | factory | ||
) | [private] |
bool server::detach | ( | std::string const & | name | ) | [private] |
dummy * server::get | ( | std::string const & | name | ) | const [private] |
server & server::instance | ( | ) | [static, private] |
friend class utilmm::singleton::dummy [friend] |
recursive_mutex utilmm::singleton::server::sing_mtx [static, private] |
server * utilmm::singleton::server::the_instance = 0 [static, private] |