8 #ifndef DRIPLINE_THROW_REPLY_HH_ 9 #define DRIPLINE_THROW_REPLY_HH_ 13 #include "member_variables.hh" 45 throw_reply(
const return_code& a_code, scarab::param_ptr_t a_payload_ptr = scarab::param_ptr_t(
new scarab::param()) );
51 template<
class x_streamable >
56 const std::string& return_message()
const noexcept;
57 std::string& return_message();
62 const scarab::param& payload()
const noexcept;
63 scarab::param& payload();
64 void set_payload( scarab::param_ptr_t a_payload );
65 const scarab::param_ptr_t& get_payload_ptr()
const noexcept;
68 mv_referrable_static( std::string, py_throw_reply_keyword );
78 template<
class x_streamable >
81 std::stringstream stream;
83 f_return_message += stream.str();
89 f_return_message += a_fragment;
95 f_return_message += std::string( a_fragment );
101 return f_return_message;
106 return f_return_message;
111 return *f_return_code;
116 f_return_code.reset(
new copy_code( a_code ) );
132 f_payload = std::move( a_payload );
Base class for return codes.
const return_code & ret_code() const noexcept
const scarab::param_ptr_t & get_payload_ptr() const noexcept
scarab::param_ptr_t f_payload
Stores a copy of the return-code value, name, and description, either as a custom return-code or copy...
std::ostream & operator<<(std::ostream &a_os, op_t an_op)
Pass the integer-equivalent of a message-operation enum to an ostream.
throw_reply & operator<<(x_streamable a_fragment)
const scarab::param & payload() const noexcept
std::string f_return_message
Object that can be thrown while processing a request to send a reply.
std::shared_ptr< return_code > f_return_code
const std::string & return_message() const noexcept
void set_return_code(const return_code &a_code)
void set_payload(scarab::param_ptr_t a_payload)