![]() |
The Gaudi Framework
v26r0
|
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 () | |
Constructor. More... | |
StatusCode (unsigned long code, const IssueSeverity &sev) | |
StatusCode (unsigned long code, bool checked=false) | |
StatusCode (const StatusCode &rhs) | |
StatusCode (StatusCode &&rhs) | |
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 Types | |
typedef boost::shared_ptr < IssueSeverity > | SeverityPtr |
Protected Attributes | |
unsigned long | d_code |
The status code. More... | |
bool | m_checked |
If the Status code has been checked. More... | |
SeverityPtr | 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 30 of file StatusCode.h.
|
protected |
Definition at line 186 of file StatusCode.h.
anonymous enum |
Enumerator | |
---|---|
FAILURE | |
SUCCESS | |
RECOVERABLE |
Definition at line 32 of file StatusCode.h.
|
inline |
Constructor.
Definition at line 39 of file StatusCode.h.
|
inline |
Definition at line 41 of file StatusCode.h.
|
inline |
Definition at line 52 of file StatusCode.h.
|
inline |
Definition at line 55 of file StatusCode.h.
|
inline |
Move constructor.
Definition at line 62 of file StatusCode.h.
|
inline |
Destructor.
Definition at line 69 of file StatusCode.h.
|
private |
Definition at line 37 of file StatusCode.cpp.
|
static |
Definition at line 27 of file StatusCode.cpp.
|
static |
Definition at line 23 of file StatusCode.cpp.
|
static |
Definition at line 19 of file StatusCode.cpp.
|
inline |
Get the status code by value.
Definition at line 92 of file StatusCode.h.
|
inline |
Definition at line 107 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 85 of file StatusCode.h.
|
inline |
Definition at line 86 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 110 of file StatusCode.h.
|
inline |
Assignment operator.
Definition at line 116 of file StatusCode.h.
|
inline |
Definition at line 120 of file StatusCode.h.
|
inline |
Ignore the checking code;.
Definition at line 104 of file StatusCode.h.
|
inline |
Set the status code by value.
Definition at line 98 of file StatusCode.h.
const IssueSeverity & StatusCode::severity | ( | ) | const |
Severity.
Definition at line 31 of file StatusCode.cpp.
|
friend |
|
friend |
|
protected |
|
mutableprotected |
If the Status code has been checked.
Definition at line 178 of file StatusCode.h.
|
protected |
Pointer to a IssueSeverity.
Definition at line 188 of file StatusCode.h.
|
staticprotected |
Global flag to control if StatusCode need to be checked.
Definition at line 190 of file StatusCode.h.