Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IPartitionControl.cpp
Go to the documentation of this file.
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 ) ) {
13  return "PARTITION_NOT_PRESENT";
15  return "PARTITION_EXISTS";
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 )
The category assigned to a StatusCode.
Definition: StatusCode.h:63
virtual const char * name() const =0
Name of the category.
STL class.
virtual bool isRecoverable(code_t code) const
Is code considered recoverable ?
Definition: StatusCode.h:78
#define STATUSCODE_ENUM_IMPL(...)
Assign a category to the StatusCode enum declared with STATUSCODE_ENUM_DECL( ENUM ) ...
Definition: StatusCode.h:248
static const Category & default_category() noexcept
Default Gaudi StatusCode category.
Definition: StatusCode.h:263
virtual std::string message(code_t code) const
Description for code within this category.
Definition: StatusCode.h:71
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:52