Public Member Functions | Private Attributes
Poco::SingletonHolder< S > Class Template Reference

#include <SingletonHolder.h>

List of all members.

Public Member Functions

S * get ()
 SingletonHolder ()
 Creates the SingletonHolder.
 ~SingletonHolder ()

Private Attributes

FastMutex _m
S * _pS

Detailed Description

template<class S>
class Poco::SingletonHolder< S >

This is a helper template class for managing singleton objects allocated on the heap. The class ensures proper deletion (including calling of the destructor) of singleton objects when the application that created them terminates.

Definition at line 51 of file SingletonHolder.h.


Constructor & Destructor Documentation

template<class S>
Poco::SingletonHolder< S >::SingletonHolder ( ) [inline]

Creates the SingletonHolder.

Definition at line 59 of file SingletonHolder.h.

template<class S>
Poco::SingletonHolder< S >::~SingletonHolder ( ) [inline]

Destroys the SingletonHolder and the singleton object that it holds.

Definition at line 64 of file SingletonHolder.h.


Member Function Documentation

template<class S>
S* Poco::SingletonHolder< S >::get ( ) [inline]

Returns a pointer to the singleton object hold by the SingletonHolder. The first call to get will create the singleton.

Definition at line 70 of file SingletonHolder.h.


Member Data Documentation

template<class S>
FastMutex Poco::SingletonHolder< S >::_m [private]

Definition at line 82 of file SingletonHolder.h.

template<class S>
S* Poco::SingletonHolder< S >::_pS [private]

Definition at line 81 of file SingletonHolder.h.


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


pluginlib
Author(s): Tully Foote and Eitan Marder-Eppstein
autogenerated on Sat Dec 28 2013 17:20:20