The Gaudi Framework
v29r0 (ff2e7097)
|
This class is used for returning status codes from appropriate routines. More...
#include <GaudiKernel/StatusCode.h>
Classes | |
class | ScopedDisableChecking |
Simple RAII class to ignore unchecked StatusCode instances in a scope. More... | |
Public Types | |
enum | { FAILURE = 0, SUCCESS = 1, RECOVERABLE = 2 } |
Public Member Functions | |
StatusCode ()=default | |
Constructor. More... | |
StatusCode (unsigned long code, IssueSeverity &&sev) | |
StatusCode (IssueSeverity &&is) | |
StatusCode (unsigned long code, bool checked=false) | |
StatusCode (const StatusCode &rhs) | |
StatusCode (StatusCode &&rhs) noexcept | |
Move constructor. More... | |
~StatusCode () | |
Destructor. More... | |
bool | isSuccess () const |
Test for a status code of SUCCESS. More... | |
bool | isFailure () const |
Test for a status code of FAILURE. More... | |
bool | isRecoverable () const |
unsigned long | getCode () const |
Get the status code by value. More... | |
void | setCode (unsigned long value) |
Set the status code by value. More... | |
void | setChecked () const |
Ignore the checking code;. More... | |
void | ignore () const |
operator unsigned long () const | |
Cast operator. More... | |
GAUDI_API const IssueSeverity & | severity () const |
Severity. More... | |
StatusCode & | operator= (unsigned long value) |
Assignment operator. More... | |
StatusCode & | operator= (const StatusCode &rhs) |
operator IgnoreError () const | |
Static Public Member Functions | |
static GAUDI_API void | enableChecking () |
static GAUDI_API void | disableChecking () |
static GAUDI_API bool | checkingEnabled () |
Protected Attributes | |
unsigned long | d_code = SUCCESS |
The status code. More... | |
bool | m_checked = false |
If the Status code has been checked. More... | |
std::shared_ptr< const IssueSeverity > | m_severity |
Pointer to a IssueSeverity. More... | |
Static Protected Attributes | |
static bool | s_checking |
Global flag to control if StatusCode need to be checked. More... | |
Private Member Functions | |
void | check () |
Friends | |
bool | operator< (const StatusCode &a, const StatusCode &b) |
Comparison operator. More... | |
bool | operator> (const StatusCode &a, const StatusCode &b) |
Comparison operator. More... | |
This class is used for returning status codes from appropriate routines.
Definition at line 28 of file StatusCode.h.
anonymous enum |
Enumerator | |
---|---|
FAILURE | |
SUCCESS | |
RECOVERABLE |
Definition at line 31 of file StatusCode.h.
|
default |
Constructor.
|
inline |
Definition at line 36 of file StatusCode.h.
|
inline |
Definition at line 44 of file StatusCode.h.
|
inline |
Definition at line 52 of file StatusCode.h.
|
inline |
Definition at line 54 of file StatusCode.h.
|
inlinenoexcept |
Move constructor.
Definition at line 60 of file StatusCode.h.
|
inline |
Destructor.
Definition at line 67 of file StatusCode.h.
|
private |
Definition at line 31 of file StatusCode.cpp.
|
static |
Definition at line 23 of file StatusCode.cpp.
|
static |
Definition at line 21 of file StatusCode.cpp.
|
static |
Definition at line 19 of file StatusCode.cpp.
|
inline |
Get the status code by value.
Definition at line 94 of file StatusCode.h.
|
inline |
Definition at line 109 of file StatusCode.h.
|
inline |
Test for a status code of FAILURE.
N.B. This is a specific type of failure where there aren't any more appropriate status codes. To test for any failure use : if ( !StatusCode.isSuccess() ) ...
Definition at line 86 of file StatusCode.h.
|
inline |
Definition at line 87 of file StatusCode.h.
|
inline |
Test for a status code of SUCCESS.
N.B. This is the only case where a function has succeeded.
Definition at line 75 of file StatusCode.h.
|
inline |
Definition at line 140 of file StatusCode.h.
|
inline |
Cast operator.
Definition at line 112 of file StatusCode.h.
|
inline |
Assignment operator.
Definition at line 118 of file StatusCode.h.
|
inline |
Definition at line 123 of file StatusCode.h.
|
inline |
Ignore the checking code;.
Definition at line 108 of file StatusCode.h.
|
inline |
Set the status code by value.
Definition at line 101 of file StatusCode.h.
const IssueSeverity & StatusCode::severity | ( | ) | const |
Severity.
Definition at line 25 of file StatusCode.cpp.
|
friend |
|
friend |
|
protected |
|
mutableprotected |
If the Status code has been checked.
Definition at line 183 of file StatusCode.h.
|
protected |
Pointer to a IssueSeverity.
Definition at line 184 of file StatusCode.h.
|
staticprotected |
Global flag to control if StatusCode need to be checked.
Definition at line 186 of file StatusCode.h.