5 #include <Poco/SharedPtr.h>
6 #include <Poco/JSON/Object.h>
8 #include "gwmessage/GWMessage.h"
9 #include "gwmessage/GWMessageType.h"
10 #include "gwmessage/GWResponse.h"
28 GWRequest(
const Poco::JSON::Object::Ptr
object);
31 typedef Poco::SharedPtr<GWRequest> Ptr;
39 std::function<
void(Poco::SharedPtr<T>)> f = [](Poco::SharedPtr<T>){})
const
41 Poco::SharedPtr<T> response = deriveResponse().cast<T>();
51 std::function<
void(GWResponse::Ptr)> f = [](GWResponse::Ptr){})
const
53 GWResponse::Ptr response = deriveResponse();
59 virtual GWResponse::Ptr deriveResponse()
const;
60 GWResponse::Ptr deriveGenericResponse(GWResponse::Ptr response)
const;
The GWMessage is abstract class representing messages (including their contents), that are being sent...
Definition: GWMessage.h:21
Abstract class representing a request message. The GWRequest can not be used alone, but it must be inherited by a specific request object.
Definition: GWRequest.h:25
GWResponse::Ptr derive(std::function< void(GWResponse::Ptr)> f=[](GWResponse::Ptr){}) const
Derive the appropriate response and apply the given function to construct it.
Definition: GWRequest.h:50
GWMessageType type() const
Returns the type of the message.
Definition: GWMessage.cpp:55
Poco::SharedPtr< T > derive(std::function< void(Poco::SharedPtr< T >)> f=[](Poco::SharedPtr< T >){}) const
Derive the appropriate response and apply the given function to construct it.
Definition: GWRequest.h:38