Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
utilmm::singleton::wrapper< Ty > Class Template Reference

Wrapper for singleton instances. More...

#include <wrapper.hh>

Inheritance diagram for utilmm::singleton::wrapper< Ty >:
Inheritance graph
[legend]

List of all members.

Static Public Member Functions

static void attach ()
 New attachement to singleton.
static void detach ()
 Detachment to singleton.
static Ty & instance ()
 Acces to the singleton.

Private Member Functions

 wrapper ()
 ~wrapper ()

Static Private Member Functions

static std::string name ()

Private Attributes

Ty value

Friends

class details::wrapper_factory< Ty >

Detailed Description

template<typename Ty>
class utilmm::singleton::wrapper< Ty >

Wrapper for singleton instances.

This class offer the interface used by utilmm::singleton::use to manipulate the instance of type Ty

Parameters:
Tythe type of the singleton instance
Author:
Frédéric Py <fpy@laas.fr>
Note:
All the mathods of this class are for internal use do not call them directly.

Definition at line 31 of file wrapper.hh.


Constructor & Destructor Documentation

template<typename Ty >
utilmm::singleton::wrapper< Ty >::wrapper ( ) [private]
template<typename Ty >
utilmm::singleton::wrapper< Ty >::~wrapper ( ) [private]

Member Function Documentation

template<typename Ty >
static void utilmm::singleton::wrapper< Ty >::attach ( ) [static]

New attachement to singleton.

Indicates to the singleton server that there's a new client to the Ty singleton.

Postcondition:
The singleton Ty exist
template<typename Ty >
static void utilmm::singleton::wrapper< Ty >::detach ( ) [static]

Detachment to singleton.

Indicates to the singleton server thet the singleton Ty has lost one client

Precondition:
The singleton Ty exist
Postcondition:
If there's no more client to singleton Ty then this one is destroyed
template<typename Ty >
static Ty& utilmm::singleton::wrapper< Ty >::instance ( ) [static]

Acces to the singleton.

Returns:
A reference to singleton Ty instance.
Precondition:
singleton Ty exist
template<typename Ty >
static std::string utilmm::singleton::wrapper< Ty >::name ( ) [static, private]

Friends And Related Function Documentation

template<typename Ty >
friend class details::wrapper_factory< Ty > [friend]

Definition at line 68 of file wrapper.hh.


Member Data Documentation

template<typename Ty >
Ty utilmm::singleton::wrapper< Ty >::value [private]

Definition at line 66 of file wrapper.hh.


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


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Thu Jan 2 2014 11:38:32