5 #include <Poco/SharedPtr.h>
6 #include <Poco/JSON/Object.h>
8 #include "gwmessage/GWMessageType.h"
9 #include "model/GlobalID.h"
23 typedef Poco::SharedPtr<GWMessage> Ptr;
50 GWMessage(
const Poco::JSON::Object::Ptr
object);
75 static GWMessage::Ptr
fromJSON(
const std::string &json);
84 static GWMessage::Ptr
fromJSON(Poco::JSON::Object::Ptr
object);
87 Poco::JSON::Object::Ptr json()
const;
93 Poco::JSON::Object::Ptr m_json;
Definition: GlobalID.h:10
std::string toString() const
Returns the string representation of the message.
Definition: GWMessage.cpp:60
The GWMessage is abstract class representing messages (including their contents), that are being sent...
Definition: GWMessage.h:21
GWMessageType type() const
Returns the type of the message.
Definition: GWMessage.cpp:55
GWMessage(const GWMessageType::Raw &type)
Constructs a GWMessage depending on the given type.
Definition: GWMessage.cpp:30
std::string toBriefString() const
Definition: GWMessage.cpp:65
static GWMessage::Ptr fromJSON(const std::string &json)
Factory method for creating subclasses of the GWMessage from the json string.
Definition: GWMessage.cpp:71
void setID(const GlobalID &id)
Set unique identifier intended to match request message with its response.
Definition: GWMessage.cpp:50
GlobalID id() const
Return unique identifier intended to match request message with its response.
Definition: GWMessage.cpp:45