Dripline-Cpp  v2.4.2
Dripline Implementation in C++
throw_reply.cc
Go to the documentation of this file.
1 /*
2  * throw_reply.cc
3  *
4  * Created on: Jan 2, 2020
5  * Author: N.S. Oblath
6  */
7 
8 #define DRIPLINE_API_EXPORTS
9 
10 #include "throw_reply.hh"
11 
12 namespace dripline
13 {
14 #ifdef DL_PYTHON
15  std::string throw_reply::s_py_throw_reply_keyword( TOSTRING(PYTHON_THROW_REPLY_KEYWORD) );
16 #endif
17 
19  f_return_message(),
20  f_return_code( new dl_unhandled_exception() ),
21  f_payload( new scarab::param() )
22  {}
23 
24  throw_reply::throw_reply( const return_code& a_code, scarab::param_ptr_t a_payload_ptr ) :
26  f_return_code( new copy_code( a_code ) ),
27  f_payload( std::move(a_payload_ptr) )
28  {}
29 
32  f_return_code( a_orig.f_return_code ),
33  f_payload( a_orig.f_payload->clone() )
34  {}
35 
37  {}
38 
40  {
43  f_payload = a_orig.f_payload->clone();
44  return *this;
45  }
46 
47 }
Base class for return codes.
Definition: return_codes.hh:39
scarab::param_ptr_t f_payload
Definition: throw_reply.hh:74
STL namespace.
Stores a copy of the return-code value, name, and description, either as a custom return-code or copy...
Definition: return_codes.hh:52
virtual ~throw_reply() noexcept
Definition: throw_reply.cc:36
Definition: core.hh:17
throw_reply & operator=(const throw_reply &a_orig)
Definition: throw_reply.cc:39
std::string f_return_message
Definition: throw_reply.hh:72
Object that can be thrown while processing a request to send a reply.
Definition: throw_reply.hh:41
std::shared_ptr< return_code > f_return_code
Definition: throw_reply.hh:73