DCMTK
Version 3.6.9
OFFIS DICOM Toolkit
|
General purpose class for condition codes. More...
Public Member Functions | |
OFCondition (unsigned short aModule, unsigned short aCode, OFStatus aStatus, const char *aText) | |
constructor for condition code with text More... | |
OFCondition (const OFConditionConst &aConst=EC_Normal) | |
constructor for condition code from constant data More... | |
OFCondition (const OFCondition &arg) | |
copy constructor More... | |
~OFCondition () | |
destructor | |
OFCondition & | operator= (const OFCondition &arg) |
copy assignment operator More... | |
unsigned short | module () const |
get the module identifier for this object. More... | |
unsigned short | code () const |
get the status code identifier for this object. More... | |
OFStatus | status () const |
get the error status this object represents. More... | |
const char * | text () const |
get a human readable text representation of this error code. More... | |
const OFConditionConst & | condition () const |
internal function only, don't use yourself. More... | |
OFBool | good () const |
check if the status is OK. More... | |
OFBool | bad () const |
check if the status is not OK, i.e. error or failure. More... | |
OFBool | operator== (const OFCondition &arg) const |
comparison operator. More... | |
OFBool | operator!= (const OFCondition &arg) const |
comparison operator. More... | |
Private Attributes | |
OFConditionConst | theCondition |
The condition information. | |
OFBool | ownsText |
Does theCondition.theText point to our own heap string which must be freed? | |
General purpose class for condition codes.
Objects of this class can be efficiently passed by value. To make this possible, the contained string is not copied when possible.
|
inline |
constructor for condition code with text
aModule | module identifier. 0 is reserved for global codes, other constants are defined elsewhere. |
aCode | status code that is unique for each module |
aStatus | condition status enum |
aText | error text. |
|
inline |
constructor for condition code from constant data
aConst | OFConditionConst to use |
|
inline |
copy constructor
arg | OFCondition to copy |
|
inline |
check if the status is not OK, i.e. error or failure.
References OF_ok.
Referenced by DcmIODUtil::writeSubSequence().
|
inline |
get the status code identifier for this object.
This uniquely identifies the error code within the module.
|
inline |
internal function only, don't use yourself.
Referenced by operator!=(), and operator==().
|
inline |
check if the status is OK.
References OF_ok.
Referenced by CMR_SRNumericMeasurementValueWithUnits< T_Units, T_DefinedGroup >::checkMeasurementUnit(), DcmIODUtil::copyFromUint8Array(), DRTSearch::searchPropertyEqual< IOD, Item, type, arg2, argument2 >::operator()(), CMR_SRNumericMeasurementValueWithUnits< T_Units, T_DefinedGroup >::setMeasurementUnit(), CMR_SRNumericMeasurementValueWithUnits< T_Units, T_DefinedGroup >::setValue(), DcmIODImage<>::write(), DcmIODUtil::writeSingleItem(), and DcmIODUtil::writeSubSequence().
|
inline |
get the module identifier for this object.
|
inline |
comparison operator.
Compares status, code and module but not error text.
arg | error to compare to |
References theCondition.
|
inline |
|
inline |
comparison operator.
Compares status, code and module but not error text.
arg | error to compare to |
References theCondition.
|
inline |
get the error status this object represents.
|
inline |
get a human readable text representation of this error code.
The returned string is owned by this OFCondition instance and must not be modified or freed.
Referenced by DcmIODUtil::writeSubSequence().