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

Public Member Functions

 Connection (const Enum &st)
 
 Connection (const Connection &st)
 
 Connection (const std::string &st)
 
 Connection (int id)
 
bool operator== (const Connection &st) const
 
bool operator!= (const Connection &st) const
 
const Connectionoperator= (const Connection &connection)
 Operator =.
 
const Connectionoperator= (const std::string &msg)
 
const Connectionoperator= (const char *msg)
 
const Connectionoperator= (int i)
 
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 Connection ONLINE
 
static const Connection OFFLINE
 
static const Enum UNKNOWN
 

Private Member Functions

 Connection (int id, const char *label)
 

Private Attributes

int m_id
 
std::string m_label
 

Detailed Description

Definition at line 19 of file Connection.h.

Constructor & Destructor Documentation

◆ Connection() [1/6]

Definition at line 15 of file Connection.cc.

15 : Enum()
16{
17
18}

◆ Connection() [2/6]

Connection ( const Enum st)

Definition at line 20 of file Connection.cc.

21 : Enum(st.getId(), st.getLabel())
22{
23
24}

◆ Connection() [3/6]

Connection ( const Connection st)

Definition at line 26 of file Connection.cc.

27 : Enum(st.getId(), st.getLabel())
28{
29
30}

◆ Connection() [4/6]

Connection ( const std::string &  st)
inline

Definition at line 29 of file Connection.h.

29{ *this = st; }

◆ Connection() [5/6]

Connection ( int  id)
inline

Definition at line 30 of file Connection.h.

30{ *this = id; }

◆ ~Connection()

~Connection ( )

Definition at line 38 of file Connection.cc.

39{
40
41}

◆ Connection() [6/6]

Connection ( int  id,
const char *  label 
)
private

Definition at line 32 of file Connection.cc.

33 : Enum(id, label)
34{
35
36}

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 Connection & operator= ( const char *  msg)

Definition at line 57 of file Connection.cc.

58{
59 if (msg != NULL) *this = std::string(msg);
60 else *this = UNKNOWN;
61 return *this;
62}

◆ operator=() [2/4]

const Connection & operator= ( const Connection connection)

Operator =.

Definition at line 43 of file Connection.cc.

44{
45 Enum::operator=(connection);
46 return *this;
47}

◆ operator=() [3/4]

const Connection & operator= ( const std::string &  msg)

Definition at line 49 of file Connection.cc.

50{
51 if (msg == ONLINE.getLabel()) *this = ONLINE;
52 else if (msg == OFFLINE.getLabel()) *this = OFFLINE;
53 else *this = UNKNOWN;
54 return *this;
55}

◆ operator=() [4/4]

const Connection & operator= ( int  i)

Definition at line 64 of file Connection.cc.

65{
66 if (i == ONLINE.getId()) *this = ONLINE;
67 else if (i == OFFLINE.getId()) *this = OFFLINE;
68 else *this = UNKNOWN;
69 return *this;
70}

Member Data Documentation

◆ 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.

◆ OFFLINE

const Connection OFFLINE
static

Definition at line 23 of file Connection.h.

◆ ONLINE

const Connection ONLINE
static

Definition at line 22 of file Connection.h.

◆ UNKNOWN

const Enum UNKNOWN
staticinherited

Definition at line 22 of file Enum.h.


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