| The Gaudi Framework v32r1 (f65d50dc)

IConversionSvc.cpp
Go to the documentation of this file.
1 #include "GaudiKernel/IConversionSvc.h"
2 #include "GaudiKernel/StatusCode.h"
3
4 namespace {
5 struct IConvSvcCategory : StatusCode::Category {
6 const char* name() const override { return "IConversionSvc"; }
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<IConversionSvc::Status>( code ) ) {
12 case IConversionSvc::Status::INVALID_ADDRESS:
13 return "INVALID_ADDRESS";
14 case IConversionSvc::Status::INVALID_OBJECT:
15 return "INVALID_OBJECT";
16 case IConversionSvc::Status::NO_MEMORY:
17 return "NO_MEMORY";
18 case IConversionSvc::Status::BAD_STORAGE_TYPE:
19 return "BAD_STORAGE_TYPE";
20 case IConversionSvc::Status::NO_SOURCE_OBJECT:
21 return "NO_SOURCE_OBJECT";
22 case IConversionSvc::Status::NO_CONVERTER:
23 return "NO_CONVERTER";
24 default:
25 return StatusCode::default_category().message( code );
26 }
27 }
28 };
29 } // namespace
30
31 STATUSCODE_ENUM_IMPL( IConversionSvc::Status, IConvSvcCategory )
StatusCode::Category
The category assigned to a StatusCode.
Definition: StatusCode.h:63
IConversionSvc::Status::INVALID_ADDRESS
Invalid address information.
IConversionSvc::Status::NO_MEMORY
No more memory available.
StatusCode::Category::name
virtual const char * name() const =0
Name of the category.
IConversionSvc::Status::INVALID_OBJECT
Object to be converted is invalid.
std::string
STL class.
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
IConversionSvc::Status::NO_CONVERTER
No proper converter is available to the service.
IConversionSvc.h
IConversionSvc::Status::NO_SOURCE_OBJECT
Error retrieving source data from source store.
StatusCode.h
IConversionSvc::Status::BAD_STORAGE_TYPE
Invalid storage type.
IConversionSvc::Status
Status
Status code definitions.
Definition: IConversionSvc.h:92
StatusCode::code_t
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:52