Belle II Software development
ERRORNo Class Reference
Inheritance diagram for ERRORNo:
Enum

Public Member Functions

 ERRORNo (const Enum &e)
 
 ERRORNo (const char *label)
 
 ERRORNo (int id)
 
const ERRORNooperator= (const std::string &label)
 
const ERRORNooperator= (const char *label)
 
const ERRORNooperator= (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 ERRORNo UNKNOWN
 
static const ERRORNo NSMONLINE
 
static const ERRORNo NSMSENDREQ
 
static const ERRORNo NSMMEMOPEN
 
static const ERRORNo NSMINIT
 
static const ERRORNo DATABASE
 

Protected Member Functions

 ERRORNo (int id, const char *label)
 

Private Attributes

int m_id
 
std::string m_label
 

Detailed Description

Definition at line 19 of file ERRORNo.h.

Constructor & Destructor Documentation

◆ ERRORNo() [1/5]

ERRORNo ( )
inline

Definition at line 30 of file ERRORNo.h.

30{}

◆ ERRORNo() [2/5]

ERRORNo ( const Enum e)
inline

Definition at line 31 of file ERRORNo.h.

31: Enum(e) {}

◆ ERRORNo() [3/5]

ERRORNo ( const char *  label)
inline

Definition at line 32 of file ERRORNo.h.

32{ *this = label; }

◆ ERRORNo() [4/5]

ERRORNo ( int  id)
inline

Definition at line 33 of file ERRORNo.h.

33{ *this = id; }

◆ ~ERRORNo()

~ERRORNo ( )
inline

Definition at line 34 of file ERRORNo.h.

34{}

◆ ERRORNo() [5/5]

ERRORNo ( int  id,
const char *  label 
)
inlineprotected

Definition at line 37 of file ERRORNo.h.

38 : 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/3]

const ERRORNo & operator= ( const char *  label)

Definition at line 52 of file ERRORNo.cc.

53{
54 if (label != nullptr) *this = std::string(label);
55 else *this = Enum::UNKNOWN;
56 return *this;
57}

◆ operator=() [2/3]

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

Definition at line 19 of file ERRORNo.cc.

20{
21 if (label == NSMSENDREQ.getLabel()) {
22 return NSMSENDREQ;
23 } else if (label == NSMONLINE.getLabel()) {
24 return NSMONLINE;
25 } else if (label == NSMMEMOPEN.getLabel()) {
26 return NSMMEMOPEN;
27 } else if (label == NSMINIT.getLabel()) {
28 return NSMINIT;
29 } else if (label == DATABASE.getLabel()) {
30 return DATABASE;
31 } else {
32 return UNKNOWN;
33 }
34}

◆ operator=() [3/3]

const ERRORNo & operator= ( int  id)

Definition at line 36 of file ERRORNo.cc.

37{
38 if (id == NSMSENDREQ.getId()) {
39 return NSMSENDREQ;
40 } else if (id == NSMONLINE.getId()) {
41 return NSMONLINE;
42 } else if (id == NSMMEMOPEN.getId()) {
43 return NSMMEMOPEN;
44 } else if (id == NSMINIT.getId()) {
45 return NSMINIT;
46 } else if (id == DATABASE.getId()) {
47 return DATABASE;
48 }
49 return UNKNOWN;
50}

Member Data Documentation

◆ DATABASE

const ERRORNo DATABASE
static

Definition at line 27 of file ERRORNo.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.

◆ NSMINIT

const ERRORNo NSMINIT
static

Definition at line 26 of file ERRORNo.h.

◆ NSMMEMOPEN

const ERRORNo NSMMEMOPEN
static

Definition at line 25 of file ERRORNo.h.

◆ NSMONLINE

const ERRORNo NSMONLINE
static

Definition at line 23 of file ERRORNo.h.

◆ NSMSENDREQ

const ERRORNo NSMSENDREQ
static

Definition at line 24 of file ERRORNo.h.

◆ UNKNOWN

const ERRORNo UNKNOWN
static

Definition at line 22 of file ERRORNo.h.


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