SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
MngrState.cc
Go to the documentation of this file.
1 /*
2  * SWC-DB© Copyright since 2019 Alex Kashirin <kashirin.alex@gmail.com>
3  * License details at <https://github.com/kashirin-alex/swc-db/#license>
4  */
5 
6 
8 
9 
10 namespace SWC { namespace DB { namespace Types {
11 
12 
13 namespace {
14  const char MngrState_NOTSET[] = "NOTSET";
15  const char MngrState_OFF[] = "OFF";
16  const char MngrState_STANDBY[] = "STANDBY";
17  const char MngrState_WANT[] = "WANT";
18  const char MngrState_NOMINATED[] = "NOMINATED";
19  const char MngrState_ACTIVE[] = "ACTIVE";
20  const char MngrState_UNKNOWN[] = "UNKNOWN";
21 }
22 
23 
24 const char* to_string(MngrState state) noexcept {
25  switch(state) {
26 
27  case MngrState::NOTSET:
28  return MngrState_NOTSET;
29 
30  case MngrState::OFF:
31  return MngrState_OFF;
32 
33  case MngrState::STANDBY:
34  return MngrState_STANDBY;
35 
36  case MngrState::WANT:
37  return MngrState_WANT;
38 
39  case MngrState::NOMINATED:
40  return MngrState_NOMINATED;
41 
42  case MngrState::ACTIVE:
43  return MngrState_ACTIVE;
44 
45  default:
46  return MngrState_UNKNOWN;
47  }
48 }
49 
50 
51 }}}
SWC::DB::Types::MngrColumn::NOTSET
@ NOTSET
Definition: MngrColumnState.h:17
SWC::DB::Types::MngrState::NOTSET
@ NOTSET
SWC::DB::Types::to_string
const char *SWC_CONST_FUNC to_string(Column typ) noexcept
Definition: Column.cc:38
MngrState.h
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC::DB::Types::MngrState
MngrState
Definition: MngrState.h:14