Access point to singleton. More...
#include <use.hh>
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. |
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.
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
.
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
.
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.
Ty& utilmm::singleton::use< Ty >::instance | ( | ) | const |
Access to singleton.
Ty
Ty& utilmm::singleton::use< Ty >::operator* | ( | ) | const |
Access to singleton.
Ty* utilmm::singleton::use< Ty >::operator-> | ( | ) | const |
Access to singleton.
This operator allow client to directly access to singlton's attributes.