Public Member Functions
utilmm::singleton::use< Ty > Struct Template Reference

Access point to singleton. More...

#include <use.hh>

List of all members.

Public Member Functions

Ty & instance () const
 Access to singleton.
Ty & operator* () const
 Access to singleton.
Ty * operator-> () const
 Access to singleton.
 use ()
 Constructor.
 use (use const &other)
 Copy constructor.
 ~use ()
 Destructor.

Detailed Description

template<typename Ty>
struct utilmm::singleton::use< Ty >

Access point to singleton.

This class is the used to acces to a singleton with type Ty . It also manage the singleton life time indicating to the server that this singleton has a new client.

Author:
Frédéric Py <fpy@laas.fr>

Definition at line 30 of file use.hh.


Constructor & Destructor Documentation

template<typename Ty>
utilmm::singleton::use< Ty >::use ( )

Constructor.

Create a new instance and eventually create the singleton. This constructor will indicate to server that thze singleton Ty has a new client. If it is the first client then the sezrver will create the singleton Ty.

template<typename Ty>
utilmm::singleton::use< Ty >::use ( use< Ty > const &  other)

Copy constructor.

This constructor only indicate to server that there's a new client to sinbgleton Ty.

template<typename Ty>
utilmm::singleton::use< Ty >::~use ( )

Destructor.

Indicate to server that singlerton Ty has lost one client if the number of client to Ty becomes null then the singleton is destroyed.


Member Function Documentation

template<typename Ty>
Ty& utilmm::singleton::use< Ty >::instance ( ) const

Access to singleton.

Returns:
A reference to the singleton Ty
template<typename Ty>
Ty& utilmm::singleton::use< Ty >::operator* ( ) const

Access to singleton.

See also:
instance() const
template<typename Ty>
Ty* utilmm::singleton::use< Ty >::operator-> ( ) const

Access to singleton.

This operator allow client to directly access to singlton's attributes.

See also:
instance() const

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


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Wed Sep 16 2015 07:05:43