Msg: Dead code removal
This commit is contained in:
45
src/Msg.cpp
45
src/Msg.cpp
@@ -37,62 +37,17 @@ Msg::Msg ()
|
|||||||
_header["client"] = PACKAGE_STRING;
|
_header["client"] = PACKAGE_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
Msg::Msg (const Msg& other)
|
|
||||||
: _header (other._header)
|
|
||||||
, _payload (other._payload)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
Msg& Msg::operator= (const Msg& other)
|
|
||||||
{
|
|
||||||
if (this != &other)
|
|
||||||
{
|
|
||||||
_header = other._header;
|
|
||||||
_payload = other._payload;
|
|
||||||
}
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
bool Msg::operator== (const Msg& other) const
|
|
||||||
{
|
|
||||||
return _header == other._header &&
|
|
||||||
_payload == other._payload;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Msg::~Msg ()
|
Msg::~Msg ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
void Msg::clear ()
|
|
||||||
{
|
|
||||||
_header.clear ();
|
|
||||||
_payload = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
void Msg::set (const std::string& name, const int value)
|
|
||||||
{
|
|
||||||
_header[name] = format (value);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Msg::set (const std::string& name, const std::string& value)
|
void Msg::set (const std::string& name, const std::string& value)
|
||||||
{
|
{
|
||||||
_header[name] = value;
|
_header[name] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
void Msg::set (const std::string& name, const double value)
|
|
||||||
{
|
|
||||||
_header[name] = format (value);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Msg::setPayload (const std::string& payload)
|
void Msg::setPayload (const std::string& payload)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,16 +35,9 @@ class Msg
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Msg ();
|
Msg ();
|
||||||
Msg (const Msg&);
|
|
||||||
Msg& operator= (const Msg&);
|
|
||||||
bool operator== (const Msg&) const;
|
|
||||||
~Msg ();
|
~Msg ();
|
||||||
|
|
||||||
void clear ();
|
|
||||||
|
|
||||||
void set (const std::string&, const int);
|
|
||||||
void set (const std::string&, const std::string&);
|
void set (const std::string&, const std::string&);
|
||||||
void set (const std::string&, const double);
|
|
||||||
void setPayload (const std::string&);
|
void setPayload (const std::string&);
|
||||||
std::string get (const std::string&) const;
|
std::string get (const std::string&) const;
|
||||||
std::string getPayload () const;
|
std::string getPayload () const;
|
||||||
|
|||||||
Reference in New Issue
Block a user