Util--  1.1
Static Public Member Functions | Friends | List of all members
utilmm::singleton::wrapper< Ty > Class Template Reference

Wrapper for singleton instances. More...

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

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

Static Public Member Functions

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

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@l.nosp@m.aas..nosp@m.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 Mon Oct 8 2018 08:38:45 for Util-- by doxygen 1.8.11
SourceForge.net Project Page