OFGlobal< T > Class Template Reference

Template class which allows to declare global objects that are protected by a Mutex if used in multi-thread applications. More...

List of all members.

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.
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

val
 value of this object


Detailed Description

template<class T>
class OFGlobal< T >

Template class which allows to declare global objects that are protected by a Mutex if used in multi-thread applications.

Must be compiled with -D_REENTRANT for multi-thread-operation. Template class T must have copy constructor and assignment operator.

Definition at line 49 of file ofglobal.h.


Constructor & Destructor Documentation

template<class T>
OFGlobal< T >::OFGlobal const T &  arg  )  [inline]
 

constructor.

Parameters:
arg value to which this object is initialised

Definition at line 56 of file ofglobal.h.


Member Function Documentation

template<class T>
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.

Returns:
value of this object.

Definition at line 103 of file ofglobal.h.

Referenced by DicomImageClass::checkDebugLevel(), and DicomImageClass::getDebugLevel().

template<class T>
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.

Parameters:
arg new value

Definition at line 72 of file ofglobal.h.

Referenced by DicomImageClass::setDebugLevel().

template<class T>
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.

Parameters:
arg return value is assigned to this parameter.

Definition at line 87 of file ofglobal.h.


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


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5