DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | List of all members
OFerror_category Class Referenceabstract

OFerror_category serves as the base class for specific error category types, such as OFsystem_category. More...

## Public Member Functions
| OFerror_category ()
| Default constructor, used by derived classes.
virtual | ~OFerror_category ()
| Virtual destructor, does nothing.
virtual const char * | name () const =0
| Obtains the name of the category, for example "generic".
virtual OFString | message (int code) const =0
| Constructs an explanatory string for an error code.

## Detailed Description

OFerror_category serves as the base class for specific error category types, such as OFsystem_category.

It is possible to make your own error_category class. The objects of error category classes are treated as singletons, passed by reference.

Note
  this implementation is meant to be a subset of the C++11's std::error_category that lacks the following features: error condition support, iostream category, future category. See: http://en.cppreference.com/w/cpp/error/error_category to compare OFerror_category against std::error_category.

The following table describes the possible operations on two instances a and b of OFerror_category:

Expression | Meaning
--- | ---
`a != b` | Compares two OFerror_category objects and evaluates to OFTrue if both objects refer to different error categories.
`a == b` | Compares two OFerror_category objects and evaluates to OFTrue if both objects refer to the same error category.
`a < b` | Implements a total order on OFerror_category objects. The semantics of one category being compared less than another are intentionally not defined, but, if one category compares less than to another it will stay that way during the remaining execution of the program and one and the same category will never compare less than to itself.

See also
  OFgeneric_category()
  OFsystem_category()

## Member Function Documentation

## ◆ message()

virtual OFString OFerror_category::message | ( | int | code | ) | const
| pure virtual

Constructs an explanatory string for an error code.

Parameters

  code | an integer that shall be interpreted as an error code.

Returns
  an explanatory error message for the given code as an OFString.

References OFerror_category().

## ◆ name()

virtual const char * OFerror_category::name | ( |  | ) | const
| pure virtual

Obtains the name of the category, for example "generic".

Returns
  a character pointer that refers to the name of the category.

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

- ofstd/include/dcmtk/ofstd/oferror.h

Generated on Sat Mar 1 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2