Belle II Software development
NSMCommand Class Reference
Inheritance diagram for NSMCommand:
Enum RCCommand RFCommand

Public Member Functions

 NSMCommand (const Enum &e)
 
 NSMCommand (const NSMCommand &cmd)
 
 NSMCommand (const char *label)
 
 NSMCommand (const std::string &label)
 
 NSMCommand (int id)
 
 NSMCommand (int id, const char *label)
 
const NSMCommandoperator= (const NSMCommand &command)
 Operator =.
 
const NSMCommandoperator= (const std::string &label)
 
const NSMCommandoperator= (const char *label)
 
const NSMCommandoperator= (int id)
 
int getId () const
 
const char * getLabel () const
 
const std::string & getLabelString () const
 
bool operator== (const Enum &e) const
 
bool operator== (const std::string &label) const
 
bool operator!= (const Enum &e) const
 
bool operator!= (const std::string &label) const
 

Static Public Attributes

static const NSMCommand OK
 
static const NSMCommand STATE
 
static const NSMCommand ERROR
 
static const NSMCommand FATAL
 
static const NSMCommand LOG
 
static const NSMCommand LOGSET
 
static const NSMCommand LOGGET
 
static const NSMCommand VLISTGET
 
static const NSMCommand VLISTSET
 
static const NSMCommand VGET
 
static const NSMCommand VSET
 
static const NSMCommand VREPLY
 
static const NSMCommand DATAGET
 
static const NSMCommand DATASET
 
static const NSMCommand DBGET
 
static const NSMCommand DBSET
 
static const NSMCommand DBLISTGET
 
static const NSMCommand DBLISTSET
 
static const NSMCommand LOGLIST
 
static const int SUGGESTED = 2
 
static const int ENABLED = 1
 
static const int DISABLED = 0
 
static const Enum UNKNOWN
 

Private Attributes

int m_id
 
std::string m_label
 

Detailed Description

Definition at line 19 of file NSMCommand.h.

Constructor & Destructor Documentation

◆ NSMCommand() [1/7]

NSMCommand ( )
inline

Definition at line 50 of file NSMCommand.h.

50{}

◆ NSMCommand() [2/7]

NSMCommand ( const Enum e)
inline

Definition at line 51 of file NSMCommand.h.

51: Enum(e) {}

◆ NSMCommand() [3/7]

NSMCommand ( const NSMCommand cmd)
inline

Definition at line 52 of file NSMCommand.h.

52: Enum(cmd) {}

◆ NSMCommand() [4/7]

NSMCommand ( const char *  label)
inline

Definition at line 53 of file NSMCommand.h.

53{ *this = label; }

◆ NSMCommand() [5/7]

NSMCommand ( const std::string &  label)
inlineexplicit

Definition at line 54 of file NSMCommand.h.

54{ *this = label; }

◆ NSMCommand() [6/7]

NSMCommand ( int  id)
inlineexplicit

Definition at line 55 of file NSMCommand.h.

55{ *this = id; }

◆ ~NSMCommand()

~NSMCommand ( )
inline

Definition at line 56 of file NSMCommand.h.

56{}

◆ NSMCommand() [7/7]

NSMCommand ( int  id,
const char *  label 
)
inline

Definition at line 59 of file NSMCommand.h.

60 : Enum(id, label) {}

Member Function Documentation

◆ getId()

int getId ( ) const
inlineinherited

Definition at line 34 of file Enum.h.

34{ return m_id; }

◆ getLabel()

const char * getLabel ( ) const
inlineinherited

Definition at line 35 of file Enum.h.

35{ return m_label.c_str(); }

◆ getLabelString()

const std::string & getLabelString ( ) const
inlineinherited

Definition at line 36 of file Enum.h.

36{ return m_label; }

◆ operator=() [1/4]

const NSMCommand & operator= ( const char *  label)

Definition at line 90 of file NSMCommand.cc.

91{
92 if (label != NULL) *this = std::string(label);
93 else *this = Enum::UNKNOWN;
94 return *this;
95}

◆ operator=() [2/4]

const NSMCommand & operator= ( const NSMCommand command)

Operator =.

Definition at line 32 of file NSMCommand.cc.

33{
34 Enum::operator=(command);
35 return *this;
36}

◆ operator=() [3/4]

const NSMCommand & operator= ( const std::string &  label)

Definition at line 38 of file NSMCommand.cc.

39{
40 if (label == LOG.getLabel()) *this = LOG;
41 else if (label == OK.getLabel()) *this = OK;
42 else if (label == ERROR.getLabel()) *this = ERROR;
43 else if (label == FATAL.getLabel()) *this = FATAL;
44 else if (label == LOG.getLabel()) *this = LOG;
45 else if (label == LOGSET.getLabel()) *this = LOGSET;
46 else if (label == LOGGET.getLabel()) *this = LOGGET;
47 else if (label == STATE.getLabel()) *this = STATE;
48 else if (label == VGET.getLabel()) *this = VGET;
49 else if (label == VSET.getLabel()) *this = VSET;
50 else if (label == VREPLY.getLabel()) *this = VREPLY;
51 else if (label == VLISTGET.getLabel()) *this = VLISTGET;
52 else if (label == VLISTSET.getLabel()) *this = VLISTSET;
53 else if (label == DATAGET.getLabel()) *this = DATAGET;
54 else if (label == DATASET.getLabel()) *this = DATASET;
55 else if (label == DBSET.getLabel()) *this = DBSET;
56 else if (label == DBGET.getLabel()) *this = DBGET;
57 else if (label == DBLISTSET.getLabel()) *this = DBLISTSET;
58 else if (label == DBLISTGET.getLabel()) *this = DBLISTGET;
59 else if (label == LOGLIST.getLabel()) *this = LOGLIST;
60 else *this = Enum::UNKNOWN;
61 return *this;
62}

◆ operator=() [4/4]

const NSMCommand & operator= ( int  id)

Definition at line 64 of file NSMCommand.cc.

65{
66 if (id == LOG.getId()) *this = LOG;
67 else if (id == OK.getId()) *this = OK;
68 else if (id == ERROR.getId()) *this = ERROR;
69 else if (id == FATAL.getId()) *this = FATAL;
70 else if (id == LOG.getId()) *this = LOG;
71 else if (id == LOGSET.getId()) *this = LOGSET;
72 else if (id == LOGGET.getId()) *this = LOGGET;
73 else if (id == STATE.getId()) *this = STATE;
74 else if (id == VSET.getId()) *this = VSET;
75 else if (id == VGET.getId()) *this = VGET;
76 else if (id == VREPLY.getId()) *this = VREPLY;
77 else if (id == VLISTSET.getId()) *this = VLISTSET;
78 else if (id == VLISTGET.getId()) *this = VLISTGET;
79 else if (id == DATASET.getId()) *this = DATASET;
80 else if (id == DATAGET.getId()) *this = DATAGET;
81 else if (id == DBSET.getId()) *this = DBSET;
82 else if (id == DBGET.getId()) *this = DBGET;
83 else if (id == DBLISTSET.getId()) *this = DBLISTSET;
84 else if (id == DBLISTGET.getId()) *this = DBLISTGET;
85 else if (id == LOGLIST.getId()) *this = LOGLIST;
86 else *this = Enum::UNKNOWN;
87 return *this;
88}

Member Data Documentation

◆ DATAGET

const NSMCommand DATAGET
static

Definition at line 36 of file NSMCommand.h.

◆ DATASET

const NSMCommand DATASET
static

Definition at line 37 of file NSMCommand.h.

◆ DBGET

const NSMCommand DBGET
static

Definition at line 38 of file NSMCommand.h.

◆ DBLISTGET

const NSMCommand DBLISTGET
static

Definition at line 40 of file NSMCommand.h.

◆ DBLISTSET

const NSMCommand DBLISTSET
static

Definition at line 41 of file NSMCommand.h.

◆ DBSET

const NSMCommand DBSET
static

Definition at line 39 of file NSMCommand.h.

◆ DISABLED

const int DISABLED = 0
static

Definition at line 47 of file NSMCommand.h.

◆ ENABLED

const int ENABLED = 1
static

Definition at line 46 of file NSMCommand.h.

◆ ERROR

const NSMCommand ERROR
static

Definition at line 24 of file NSMCommand.h.

◆ FATAL

const NSMCommand FATAL
static

Definition at line 25 of file NSMCommand.h.

◆ LOG

const NSMCommand LOG
static

Definition at line 26 of file NSMCommand.h.

◆ LOGGET

const NSMCommand LOGGET
static

Definition at line 28 of file NSMCommand.h.

◆ LOGLIST

const NSMCommand LOGLIST
static

Definition at line 42 of file NSMCommand.h.

◆ LOGSET

const NSMCommand LOGSET
static

Definition at line 27 of file NSMCommand.h.

◆ m_id

int m_id
privateinherited

Definition at line 45 of file Enum.h.

◆ m_label

std::string m_label
privateinherited

Definition at line 46 of file Enum.h.

◆ OK

const NSMCommand OK
static

Definition at line 22 of file NSMCommand.h.

◆ STATE

const NSMCommand STATE
static

Definition at line 23 of file NSMCommand.h.

◆ SUGGESTED

const int SUGGESTED = 2
static

Definition at line 45 of file NSMCommand.h.

◆ UNKNOWN

const Enum UNKNOWN
staticinherited

Definition at line 22 of file Enum.h.

◆ VGET

const NSMCommand VGET
static

Definition at line 31 of file NSMCommand.h.

◆ VLISTGET

const NSMCommand VLISTGET
static

Definition at line 29 of file NSMCommand.h.

◆ VLISTSET

const NSMCommand VLISTSET
static

Definition at line 30 of file NSMCommand.h.

◆ VREPLY

const NSMCommand VREPLY
static

Definition at line 33 of file NSMCommand.h.

◆ VSET

const NSMCommand VSET
static

Definition at line 32 of file NSMCommand.h.


The documentation for this class was generated from the following files: