Static Public Member Functions | Protected Member Functions | Static Private Member Functions | Static Private Attributes
Templates::Singleton< T > Class Template Reference

#include <singleton.h>

Inheritance diagram for Templates::Singleton< T >:
Inheritance graph
[legend]

List of all members.

Static Public Member Functions

static T & instance ()

Protected Member Functions

 Singleton ()
 ~Singleton ()

Static Private Member Functions

static void initSingleton ()

Static Private Attributes

static boost::once_flag flag = BOOST_ONCE_INIT
static boost::scoped_ptr< T > t

Detailed Description

template<class T>
class Templates::Singleton< T >

Definition at line 21 of file singleton.h.


Constructor & Destructor Documentation

template<class T>
Templates::Singleton< T >::Singleton ( ) [inline, protected]

Definition at line 36 of file singleton.h.

template<class T>
Templates::Singleton< T >::~Singleton ( ) [inline, protected]

Definition at line 38 of file singleton.h.


Member Function Documentation

template<class T>
static void Templates::Singleton< T >::initSingleton ( ) [inline, static, private]

Method initializates the object and calls it's constructor.

Definition at line 43 of file singleton.h.

template<class T>
static T& Templates::Singleton< T >::instance ( ) [inline, static]

Method returns a non-copyable reference to stored object instance.

Definition at line 27 of file singleton.h.


Member Data Documentation

template<class T>
boost::once_flag Singleton::flag = BOOST_ONCE_INIT [static, private]

Initialization of once_flag.

Definition at line 50 of file singleton.h.

template<class T>
boost::scoped_ptr< T > Singleton::t [static, private]

Initialization of scoped pointer.

Definition at line 49 of file singleton.h.


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


proxy_common
Author(s): Ronny Hartanto
autogenerated on Mon Oct 6 2014 06:54:18