| The Gaudi Framework v32r1 (f65d50dc)

IPartitionControl.cpp
Go to the documentation of this file.
1 #include "GaudiKernel/IPartitionControl.h"
2 #include "GaudiKernel/StatusCode.h"
3
4 namespace {
5 struct IPartitionControlCategory : StatusCode::Category {
6 const char* name() const override { return "IPartitionControl"; }
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<IPartitionControl::Status>( code ) ) {
12 case IPartitionControl::Status::PARTITION_NOT_PRESENT:
13 return "PARTITION_NOT_PRESENT";
14 case IPartitionControl::Status::PARTITION_EXISTS:
15 return "PARTITION_EXISTS";
16 case IPartitionControl::Status::NO_ACTIVE_PARTITION:
17 return "NO_ACTIVE_PARTITION";
18 default:
19 return StatusCode::default_category().message( code );
20 }
21 }
22 };
23 } // namespace
24
25 STATUSCODE_ENUM_IMPL( IPartitionControl::Status, IPartitionControlCategory )
IPartitionControl::Status::PARTITION_EXISTS
IPartitionControl::Status::PARTITION_NOT_PRESENT
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.
IPartitionControl::Status
Status
Definition: IPartitionControl.h:174
std::string
STL class.
IPartitionControl.h
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
IPartitionControl::Status::NO_ACTIVE_PARTITION
StatusCode.h
StatusCode::code_t
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:52