Dripline-Cpp  v2.10.11
Dripline Implementation in C++
reply_cache.hh
Go to the documentation of this file.
1 /*
2  * reply_cache.hh
3  *
4  * Created on: Dec 31, 2019
5  * Author: N.S. Oblath
6  */
7 
8 #ifndef DRIPLINE_REPLY_CACHE_HH_
9 #define DRIPLINE_REPLY_CACHE_HH_
10 
11 #include "throw_reply.hh"
12 
13 #include "thread_singleton.hh"
14 
15 namespace dripline
16 {
17 
19  void DRIPLINE_API set_reply_cache( const return_code& a_code, const std::string& a_message, scarab::param_ptr_t a_payload_ptr );
20 
37  class DRIPLINE_API reply_cache : public throw_reply, public scarab::thread_singleton< reply_cache >
38  {
39  public:
40  reply_cache& operator=( const throw_reply& a_orig );
41 
43  void set_cache( const return_code& a_code, const std::string& a_message, scarab::param_ptr_t a_payload_ptr );
44 
45  protected:
46  allow_thread_singleton_access( reply_cache );
47  reply_cache();
48  reply_cache( const reply_cache& ) = delete;
49  reply_cache( reply_cache&& a_orig );
50  virtual ~reply_cache() noexcept = default;
51 
52  reply_cache& operator=( const reply_cache& ) = delete;
53  reply_cache& operator=( reply_cache&& a_orig );
54  };
55 
56 } /* namespace dripline */
57 
58 #endif /* DRIPLINE_REPLY_CACHE_HH_ */
A singleton throw_reply object used to transfer throw_reply information to C++ from other implementat...
Definition: reply_cache.hh:38
virtual ~reply_cache() noexcept=default
reply_cache(const reply_cache &)=delete
Object that can be thrown while processing a request to send a reply.
Definition: throw_reply.hh:42
#define DRIPLINE_API
Definition: dripline_api.hh:34
void set_reply_cache(const return_code &a_code, const std::string &a_message, scarab::param_ptr_t a_payload_ptr)
Set the contents of the reply cache (functional access to the singleton reply_cache)
Definition: reply_cache.cc:15
Base class for return codes.
Definition: return_codes.hh:40