utilmm::singleton::wrapper< Ty > Class Template Reference
[Singleton pattern design.]

Wrapper for singleton instances. More...

#include <utilmm/singleton/bits/wrapper.hh>

Inheritance diagram for utilmm::singleton::wrapper< Ty >:

utilmm::singleton::dummy

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.

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:
Ty the 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.

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


Friends And Related Function Documentation

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


The documentation for this class was generated from the following file:
Generated on Tue Feb 19 10:51:02 2008 for Util-- by doxygen 1.5.3
SourceForge.net Project Page