StuBS
Global< T > Class Template Reference

Handy interface for OS global variables Example usage: More...

#include <object/allcore.h>

Public Member Functions

 Global ()
 
 Global (const T &val)
 
T & get ()
 
const T & get () const
 
const T & set (const T &_value)
 
T * operator-> ()
 
const T * operator-> () const
 
T & operator* ()
 
const T & operator* () const
 
T * operator& ()
 
T & operator* () volatile
 
T & operator= (T &val)
 
operator++ (int)
 
T & operator++ ()
 
operator-- (int)
 
T & operator-- ()
 
bool operator== (const T &val) const
 
bool operator!= (const T &val) const
 

Private Attributes

value
 

Detailed Description

template<typename T>
class Global< T >

Handy interface for OS global variables Example usage:

Global<int> value(1); // initialized to 1
value++; // value for X is now 2
value.set(42);
Handy interface for OS global variables Example usage:
Definition allcore.h:18
T value
Definition allcore.h:19

Constructor & Destructor Documentation

◆ Global() [1/2]

template<typename T >
Global< T >::Global ( )
inline

◆ Global() [2/2]

template<typename T >
Global< T >::Global ( const T &  val)
inlineexplicit

Member Function Documentation

◆ get() [1/2]

template<typename T >
T & Global< T >::get ( )
inline

◆ get() [2/2]

template<typename T >
const T & Global< T >::get ( ) const
inline

◆ set()

template<typename T >
const T & Global< T >::set ( const T &  _value)
inline

◆ operator->() [1/2]

template<typename T >
T * Global< T >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename T >
const T * Global< T >::operator-> ( ) const
inline

◆ operator*() [1/3]

template<typename T >
T & Global< T >::operator* ( )
inline

◆ operator*() [2/3]

template<typename T >
const T & Global< T >::operator* ( ) const
inline

◆ operator&()

template<typename T >
T * Global< T >::operator& ( )
inline

◆ operator*() [3/3]

template<typename T >
T & Global< T >::operator* ( ) volatile
inline

◆ operator=()

template<typename T >
T & Global< T >::operator= ( T &  val)
inline

◆ operator++() [1/2]

template<typename T >
T Global< T >::operator++ ( int  )
inline

◆ operator++() [2/2]

template<typename T >
T & Global< T >::operator++ ( )
inline

◆ operator--() [1/2]

template<typename T >
T Global< T >::operator-- ( int  )
inline

◆ operator--() [2/2]

template<typename T >
T & Global< T >::operator-- ( )
inline

◆ operator==()

template<typename T >
bool Global< T >::operator== ( const T &  val) const
inline

◆ operator!=()

template<typename T >
bool Global< T >::operator!= ( const T &  val) const
inline

Member Data Documentation

◆ value

template<typename T >
T Global< T >::value
private

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