Virtual Belgium  2.0
A micro-simulation platform for the Belgian population
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Singleton< T > Class Template Reference

Singleton class for the Data class. More...

#include <Data.hpp>

Static Public Member Functions

static void makeInstance (repast::Properties aProps)
 Generates a singleton instance of a T object. More...
 
static T * getInstance ()
 Return the generated, unique, instance of a T object (if already instanciated). More...
 
static void kill ()
 Free the memory. More...
 

Protected Member Functions

 Singleton ()
 Constructor. More...
 
 ~Singleton ()
 Destructor. More...
 

Static Private Attributes

static T * _singleton = NULL
 unique instance of the Data class More...
 

Detailed Description

template<typename T>
class Singleton< T >

Singleton class for the Data class.

Constructor & Destructor Documentation

template<typename T>
Singleton< T >::Singleton ( )
inlineprotected

Constructor.

template<typename T>
Singleton< T >::~Singleton ( )
inlineprotected

Destructor.

Member Function Documentation

template<typename T>
static T* Singleton< T >::getInstance ( )
inlinestatic

Return the generated, unique, instance of a T object (if already instanciated).

Returns
the unique instance of a T object
template<typename T>
static void Singleton< T >::kill ( )
inlinestatic

Free the memory.

template<typename T>
static void Singleton< T >::makeInstance ( repast::Properties  aProps)
inlinestatic

Generates a singleton instance of a T object.

Parameters
aPropsmodel properties of VirtualBelgium

Member Data Documentation

template<typename T>
T * Singleton< T >::_singleton = NULL
staticprivate

unique instance of the Data class

Initialize the singleton to NULL.


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