| The Gaudi Framework v32r1 (f65d50dc)

IInterface.cpp
Go to the documentation of this file.
1 #include "GaudiKernel/IInterface.h"
2 #include "GaudiKernel/StatusCode.h"
3
4 namespace {
5 struct IInterfaceCategory : StatusCode::Category {
6 const char* name() const override { return "IInterface"; }
7
8 bool isRecoverable( StatusCode::code_t ) const override { return false; }
9
10 std::string message( StatusCode::code_t code ) const override {
11 switch ( static_cast<IInterface::Status>( code ) ) {
12 case IInterface::Status::NO_INTERFACE:
13 return "NO_INTERFACE";
14 case IInterface::Status::VERSMISMATCH:
15 return "VERSMISMATCH";
16 default:
17 return StatusCode::default_category().message( code );
18 }
19 }
20 };
21 } // namespace
22
23 STATUSCODE_ENUM_IMPL( IInterface::Status, IInterfaceCategory )
IInterface::Status::NO_INTERFACE
Requested interface is not available.
StatusCode::Category
The category assigned to a StatusCode.
Definition: StatusCode.h:63
StatusCode::Category::name
virtual const char * name() const =0
Name of the category.
std::string
STL class.
IInterface::Status::VERSMISMATCH
Requested interface version is incompatible.
StatusCode::Category::message
virtual std::string message(code_t code) const
Description for code within this category.
Definition: StatusCode.h:71
STATUSCODE_ENUM_IMPL
#define STATUSCODE_ENUM_IMPL(...)
Assign a category to the StatusCode enum declared with STATUSCODE_ENUM_DECL( ENUM )
Definition: StatusCode.h:248
StatusCode::Category::isRecoverable
virtual bool isRecoverable(code_t code) const
Is code considered recoverable ?
Definition: StatusCode.h:78
StatusCode::default_category
static const Category & default_category() noexcept
Default Gaudi StatusCode category.
Definition: StatusCode.h:263
IInterface::Status
Status
Return status.
Definition: IInterface.h:297
StatusCode.h
IInterface.h
StatusCode::code_t
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:52