Public Member Functions | |
OFGlobal (const T &arg) | |
constructor. | |
virtual | ~OFGlobal () |
destructor. | |
void | set (const T &arg) |
assigns new value to this object. | |
void | xget (T &arg) |
gets the value of this object. | |
T | get () |
returns the value of this object. | |
Private Member Functions | |
OFGlobal () | |
unimplemented private default constructor | |
OFGlobal (const OFGlobal< T > &arg) | |
unimplemented private copy constructor | |
const OFGlobal< T > & | operator= (const OFGlobal< T > &arg) |
unimplemented private assignment operator | |
Private Attributes | |
T | val |
value of this object |
Must be compiled with -DWITH_THREADS for multi-thread-operation. Template class T must have copy constructor and assignment operator.
Definition at line 45 of file ofglobal.h.
constructor.
arg | value to which this object is initialised |
Definition at line 52 of file ofglobal.h.
void OFGlobal< T >::set | ( | const T & | arg | ) | [inline] |
assigns new value to this object.
If compiled for multi-thread operation, access to the value of the object is protected by a Mutex.
arg | new value |
Definition at line 68 of file ofglobal.h.
References OFGlobal< T >::val.
void OFGlobal< T >::xget | ( | T & | arg | ) | [inline] |
gets the value of this object.
If compiled for multi-thread operation, access to the value of the object is protected by a Mutex.
arg | return value is assigned to this parameter. |
Definition at line 83 of file ofglobal.h.
References OFGlobal< T >::val.
T OFGlobal< T >::get | ( | ) | [inline] |
returns the value of this object.
If compiled for multi-thread operation, access to the value of the object is protected by a Mutex. The result is returned by value, not by reference.
Definition at line 99 of file ofglobal.h.
References OFGlobal< T >::val.