OFFIS DCMTK  Version 3.6.0
Public Member Functions | Private Attributes | List of all members
OFCondition Class Reference

General purpose class for condition codes. More...

Collaboration diagram for OFCondition:
[legend]

Public Member Functions

 OFCondition (OFConditionString *base)
 constructor for condition code with user-defined error text
 
 OFCondition (const OFConditionConst &base=ECC_Normal)
 constructor for condition code with global const condition object
 
 OFCondition (const OFCondition &arg)
 copy constructor
 
 ~OFCondition ()
 destructor
 
OFConditionoperator= (const OFCondition &arg)
 copy assignment operator
 
unsigned short module () const
 returns the module identifier for this object.
 
unsigned short code () const
 returns the status code identifier for this object.
 
OFStatus status () const
 returns the status for this object.
 
const char * text () const
 returns the error message text for this object.
 
OFBool good () const
 returns true if status is OK
 
OFBool bad () const
 returns true if status is not OK, i. e. error or failure
 
OFBool operator== (const OFCondition &arg) const
 comparison operator.
 
OFBool operator!= (const OFCondition &arg) const
 comparison operator.
 

Private Attributes

const OFConditionBasetheCondition
 pointer to the condition base object
 

Detailed Description

General purpose class for condition codes.

Objects of this class can be efficiently passed by value since they only contain a single pointer and no virtual methods. The condition code is maintained by the object of class OFConditionBase pointed to.

Definition at line 305 of file ofcond.h.

Constructor & Destructor Documentation

OFCondition::OFCondition ( OFConditionString base)
inline

constructor for condition code with user-defined error text

Parameters
basepointer to error base, which must be allocated on the heap. The object pointed to is deleted upon destruction of this object. Pointer must not be NULL.

Definition at line 314 of file ofcond.h.

References theCondition.

OFCondition::OFCondition ( const OFConditionConst base = ECC_Normal)
inline

constructor for condition code with global const condition object

Parameters
basereference to condition base, which must be guaranteed to exist for the lifetime of this (and every derived) object since it is only referenced but not copied.

Definition at line 329 of file ofcond.h.

References theCondition.

Member Function Documentation

OFBool OFCondition::operator!= ( const OFCondition arg) const
inline

comparison operator.

Compares status, code and module but not error text.

Parameters
argerror to compare to
Returns
true if equal, false otherwise

Definition at line 435 of file ofcond.h.

References theCondition.

OFBool OFCondition::operator== ( const OFCondition arg) const
inline

comparison operator.

Compares status, code and module but not error text.

Parameters
argerror to compare to
Returns
true if equal, false otherwise

Definition at line 425 of file ofcond.h.

References theCondition.


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


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2