ifw-ccf  3.0.0-pre2
response.hpp
Go to the documentation of this file.
1 
5 #ifndef IFW_CCF_MPTK_RESPONSE_HPP_
6 #define IFW_CCF_MPTK_RESPONSE_HPP_
7 
8 #include <string>
9 
10 #include <rad/logger.hpp>
11 
12 #include <ccf/mptk/message.hpp>
13 
14 
15 namespace ccf::mptk {
16 
20  class Response {
21  public:
22  Response();
23 
24  Response(const Response& source);
25 
32  Response(const Message& message,
33  const std::string& response_code,
34  const std::string& response_data);
35 
36  ~Response();
37 
39  const Message& GetMessage() const;
40 
42  const std::string& Code() const;
43 
45  const std::string& Data() const;
46 
48  std::string ToString(const uint16_t truncate = 128) const;
49 
50  Response& operator = (const Response& source);
51 
52  protected:
54  std::string m_response_code;
55  std::string m_response_data;
56 
57  private:
58  void _Copy(const Response& source);
59 
60  };
61 
62 }
63 
64 #endif // IFW_CCF_MPTK_RESPONSE_HPP_
IFW CTD Multiprocessing Toolkit Message class.
Definition: message.hpp:19
IFW CTD Multiprocessing Toolkit Response class.
Definition: response.hpp:20
Response & operator=(const Response &source)
Definition: response.cpp:50
std::string ToString(const uint16_t truncate=128) const
Generate ASCII output providing a status of the object.
Definition: response.cpp:34
std::string m_response_code
Definition: response.hpp:54
std::string m_response_data
Definition: response.hpp:55
~Response()
Definition: response.cpp:30
const std::string & Data() const
Return response data (payload).
Definition: response.cpp:66
const Message & GetMessage() const
Get reference to original message object (for which the response was sent).
Definition: response.cpp:56
ccf::mptk::Message m_message
Definition: response.hpp:53
Response()
Definition: response.cpp:12
const std::string & Code() const
Return application specific response code.
Definition: response.cpp:61
Definition: manager.hpp:15