ifw-ccf 6.0.0
 
Loading...
Searching...
No Matches
response.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
9#include <string>
10
11#include <rad/logger.hpp>
12
14
15
16namespace ifw::ccf::mptk {
17
21 class Response {
22 public:
23 Response();
24
25 Response(const Response& source);
26
33 Response(const Message& message,
34 const std::string& response_code,
35 const std::string& response_data);
36
37 ~Response();
38
40 const Message& GetMessage() const;
41
43 const std::string& Code() const;
44
46 const std::string& Data() const;
47
49 std::string ToString(const uint16_t truncate = 128) const;
50
51 Response& operator = (const Response& source);
52
53 protected:
55 std::string m_response_code;
56 std::string m_response_data;
57
58 private:
59 void _Copy(const Response& source);
60
61 };
62
63}
IFW CTD Multiprocessing Toolkit Message class.
Definition message.hpp:25
~Response()
Definition response.cpp:31
std::string m_response_code
Definition response.hpp:55
const std::string & Code() const
Return application specific response code.
Definition response.cpp:62
ifw::ccf::mptk::Message m_message
Definition response.hpp:54
std::string ToString(const uint16_t truncate=128) const
Generate ASCII output providing a status of the object.
Definition response.cpp:35
const Message & GetMessage() const
Get reference to original message object (for which the response was sent).
Definition response.cpp:57
Response()
Definition response.cpp:13
std::string m_response_data
Definition response.hpp:56
Response & operator=(const Response &source)
Definition response.cpp:51
const std::string & Data() const
Return response data (payload).
Definition response.cpp:67
Definition logger.hpp:13