Dripline-Cpp  v2.4.2
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  virtual ~reply_cache() noexcept;
50  };
51 
52 } /* namespace dripline */
53 
54 #endif /* DRIPLINE_REPLY_CACHE_HH_ */
Base class for return codes.
Definition: return_codes.hh:39
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
A singleton throw_reply object used to transfer throw_reply information to C++ from other implementat...
Definition: reply_cache.hh:37
#define DRIPLINE_API
Definition: dripline_api.hh:34
Object that can be thrown while processing a request to send a reply.
Definition: throw_reply.hh:41