The Gaudi Framework
v25r5
|
This class is used for returning status codes from appropriate routines. More...
#include <GaudiKernel/StatusCode.h>
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) | |
GAUDI_API | ~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 () |
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... | |
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 147 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 48 of file StatusCode.h.
|
inline |
Definition at line 51 of file StatusCode.h.
StatusCode::~StatusCode | ( | ) |
Destructor.
Definition at line 33 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 79 of file StatusCode.h.
|
inline |
Definition at line 94 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 72 of file StatusCode.h.
|
inline |
Definition at line 73 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 62 of file StatusCode.h.
|
inline |
Definition at line 127 of file StatusCode.h.
|
inline |
Cast operator.
Definition at line 97 of file StatusCode.h.
|
inline |
Assignment operator.
Definition at line 103 of file StatusCode.h.
|
inline |
Definition at line 107 of file StatusCode.h.
|
inline |
Ignore the checking code;.
Definition at line 91 of file StatusCode.h.
|
inline |
Set the status code by value.
Definition at line 85 of file StatusCode.h.
const IssueSeverity & StatusCode::severity | ( | ) | const |
Severity.
Definition at line 27 of file StatusCode.cpp.
|
friend |
|
friend |
|
protected |
|
mutableprotected |
If the Status code has been checked.
Definition at line 139 of file StatusCode.h.
|
protected |
Pointer to a IssueSeverity.
Definition at line 149 of file StatusCode.h.
|
staticprotected |
Global flag to control if StatusCode need to be checked.
Definition at line 151 of file StatusCode.h.