The Gaudi Framework  master (e039bf8c)
Loading...
Searching...
No Matches
StatusCode::Category Class Referenceabstract

The category assigned to a StatusCode. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/StatusCode.h>

Inheritance diagram for StatusCode::Category:

Public Member Functions

constexpr Category () noexcept=default
virtual ~Category ()
virtual const char * name () const =0
 Name of the category.
virtual std::string message (code_t code) const
 Description for code within this category.
virtual bool isSuccess (code_t code) const
 Is code considered success ?
virtual bool isRecoverable (code_t code) const
 Is code considered recoverable ?

Detailed Description

The category assigned to a StatusCode.

Derive from this class to implement your own category. The mapping of StatusCode values to success and recoverable conditions can be defined by overriding the appropriate methods.

Definition at line 77 of file StatusCode.h.

Constructor & Destructor Documentation

◆ Category()

StatusCode::Category::Category ( )
constexprdefaultnoexcept

◆ ~Category()

virtual StatusCode::Category::~Category ( )
inlinevirtual

Definition at line 79 of file StatusCode.h.

79{}

Member Function Documentation

◆ isRecoverable()

virtual bool StatusCode::Category::isRecoverable ( code_t code) const
inlinevirtual

Is code considered recoverable ?

Reimplemented in Gaudi::Functional::FilterDecisionErrorCategory.

Definition at line 92 of file StatusCode.h.

92{ return code == static_cast<code_t>( ErrorCode::RECOVERABLE ); }
unsigned long code_t
type of StatusCode value
Definition StatusCode.h:66

◆ isSuccess()

virtual bool StatusCode::Category::isSuccess ( code_t code) const
inlinevirtual

Is code considered success ?

Note
isFailure() cannot be overridden as it is defined as !isSuccess()

Reimplemented in Gaudi::Functional::FilterDecisionErrorCategory.

Definition at line 89 of file StatusCode.h.

89{ return code == static_cast<code_t>( ErrorCode::SUCCESS ); }

◆ message()

virtual std::string StatusCode::Category::message ( code_t code) const
inlinevirtual

Description for code within this category.

Reimplemented in Gaudi::Functional::FilterDecisionErrorCategory.

Definition at line 85 of file StatusCode.h.

85{ return "UNKNOWN(" + std::to_string( code ) + ")"; }

◆ name()

virtual const char * StatusCode::Category::name ( ) const
pure virtual

Name of the category.

Implemented in Gaudi::Functional::FilterDecisionErrorCategory.


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