claw::concept::basic_singleton< T > Class Template Reference

A (really) basic implementation of the singleton design pattern. More...

#include <basic_singleton.hpp>

Inheritance diagram for claw::concept::basic_singleton< T >:
claw::concept::non_copyable

List of all members.

Static Public Member Functions

static T & get_instance ()
 Get the instance of the singleton.

Protected Member Functions

 basic_singleton ()
 Constructor.
 ~basic_singleton ()
 Destructor.

Detailed Description

template<class T>
class claw::concept::basic_singleton< T >

A (really) basic implementation of the singleton design pattern.

Author:
Julien Jorge

Definition at line 44 of file basic_singleton.hpp.


Constructor & Destructor Documentation

template<class T >
claw::concept::basic_singleton< T >::basic_singleton (  )  [inline, protected]

Constructor.

Definition at line 48 of file basic_singleton.tpp.

00049 {
00050 
00051 } // basic_singleton::basic_singleton()

template<class T >
claw::concept::basic_singleton< T >::~basic_singleton (  )  [inline, protected]

Destructor.

Definition at line 58 of file basic_singleton.tpp.

00059 {
00060 
00061 } // basic_singleton::~basic_singleton()


Member Function Documentation

template<class T >
T & claw::concept::basic_singleton< T >::get_instance (  )  [inline, static]

Get the instance of the singleton.

Definition at line 36 of file basic_singleton.tpp.

00037 {
00038   static T single_instance;
00039 
00040   return single_instance;
00041 } //  basic_singleton::get_instance()


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

Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1