![]() |
The Gaudi Framework
v29r3 (fa547fc2)
|
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, 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 |
bool | checked () const |
Has the StatusCode been checked? More... | |
operator unsigned long () const | |
Cast operator. 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... | |
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 26 of file StatusCode.h.
anonymous enum |
Enumerator | |
---|---|
FAILURE | |
SUCCESS | |
RECOVERABLE |
Definition at line 29 of file StatusCode.h.
|
default |
Constructor.
|
inline |
Definition at line 34 of file StatusCode.h.
|
inline |
Definition at line 36 of file StatusCode.h.
|
inlinenoexcept |
Move constructor.
Definition at line 39 of file StatusCode.h.
|
inline |
Destructor.
Definition at line 42 of file StatusCode.h.
|
private |
Definition at line 24 of file StatusCode.cpp.
|
inline |
Has the StatusCode been checked?
Definition at line 87 of file StatusCode.h.
|
static |
Definition at line 22 of file StatusCode.cpp.
|
static |
Definition at line 20 of file StatusCode.cpp.
|
static |
Definition at line 18 of file StatusCode.cpp.
|
inline |
Get the status code by value.
Definition at line 69 of file StatusCode.h.
|
inline |
Definition at line 84 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 61 of file StatusCode.h.
|
inline |
Definition at line 62 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 50 of file StatusCode.h.
|
inline |
Definition at line 112 of file StatusCode.h.
|
inline |
Cast operator.
Definition at line 90 of file StatusCode.h.
|
inline |
Assignment operator.
Definition at line 93 of file StatusCode.h.
|
inline |
Definition at line 98 of file StatusCode.h.
|
inline |
Ignore the checking code;.
Definition at line 83 of file StatusCode.h.
|
inline |
Set the status code by value.
Definition at line 76 of file StatusCode.h.
|
friend |
|
friend |
|
protected |
|
mutableprotected |
If the Status code has been checked.
Definition at line 155 of file StatusCode.h.
|
staticprotected |
Global flag to control if StatusCode need to be checked.
Definition at line 157 of file StatusCode.h.