ISIS Core Library 0.7.2 (api 3.0.0)
Data Structures | Static Public Member Functions

isis::util::Singletons Class Reference

Static class to handle singletons of a given type and priority. More...

#include <singletons.hpp>

Data Structures

class  Singleton

Static Public Member Functions

template<typename T , int PRIO>
static T & get ()
 The first call creates a singleton of type T with the priority PRIO (ascending order), all repetetive calls return this object.

Detailed Description

Static class to handle singletons of a given type and priority.

The special issues for these Singletons are:
1) it's a template class - can be used for every type
2) they have a priority used for destroying the Singletons AFTER the application ends:

 Singletons::get < MyClass, INT_MAX - 1 >

This generates a Singleton of MyClass with highest priority

Definition at line 31 of file singletons.hpp.


Member Function Documentation

template<typename T , int PRIO>
static T& isis::util::Singletons::get ( ) [inline, static]

The first call creates a singleton of type T with the priority PRIO (ascending order), all repetetive calls return this object.

Returns:
a reference to the same object of type T.

Definition at line 59 of file singletons.hpp.


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