1 #include "daq/slc/base/Connection.h"
5 const Connection Connection::ONLINE(10000,
"ONLINE");
6 const Connection Connection::OFFLINE(20000,
"OFFLINE");
8 Connection::Connection() :
Enum()
13 Connection::Connection(
const Enum& st)
14 :
Enum(st.getId(), st.getLabel())
20 :
Enum(st.getId(), st.getLabel())
25 Connection::Connection(
int id,
const char* label)
31 Connection::~Connection()
36 const Connection& Connection::operator=(
const std::string& msg)
38 if (msg == ONLINE.getLabel()) *
this = ONLINE;
39 else if (msg == OFFLINE.getLabel()) *
this = OFFLINE;
44 const Connection& Connection::operator=(
const char* msg)
46 if (msg != NULL) *
this = std::string(msg);
53 if (i == ONLINE.getId()) *
this = ONLINE;
54 else if (i == OFFLINE.getId()) *
this = OFFLINE;