SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
NotImplemented.h
Go to the documentation of this file.
1 /*
2  * SWC-DB© Copyright since 2019 Alex Kashirin <kashirin.alex@gmail.com>
3  * License details at <https://github.com/kashirin-alex/swc-db/#license>
4  */
5 
6 
7 #ifndef swcdb_common_Protocol_handlers_NotImplemented_h
8 #define swcdb_common_Protocol_handlers_NotImplemented_h
9 
10 
11 
12 namespace SWC { namespace Comm { namespace Protocol {
13 namespace Common { namespace Handler {
14 
15 
16 void not_implemented(const ConnHandlerPtr& conn,
17  const Event::Ptr& ev) {
18  auto cbp = Buffers::make(ev, 4);
19  cbp->append_i32(Error::NOT_IMPLEMENTED);
20  conn->send_response(cbp);
21 }
22 
23 
24 class NotImplemented : public AppHandler {
25  public:
26 
27  NotImplemented(const ConnHandlerPtr& conn, const Event::Ptr& ev)
28  : AppHandler(conn, ev){
29  }
30 
31  void run() override {
33  }
34 
35  virtual ~NotImplemented() noexcept { }
36 
37 };
38 
39 
40 
41 }}}}}
42 
43 
44 #endif // swcdb_common_Protocol_handlers_NotImplemented_h
SWC::Comm::AppHandler
Definition: AppHandler.h:18
SWC::Comm::AppHandler::m_conn
ConnHandlerPtr m_conn
Definition: AppHandler.h:32
SWC::Comm::AppHandler::m_ev
Event::Ptr m_ev
Definition: AppHandler.h:33
SWC::Comm::Protocol::Common::Handler::NotImplemented::~NotImplemented
virtual ~NotImplemented() noexcept
Definition: NotImplemented.h:35
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC::Comm::Protocol::Common::Handler::not_implemented
void not_implemented(const ConnHandlerPtr &conn, const Event::Ptr &ev)
Definition: NotImplemented.h:16
SWC::Comm::Protocol::Common::Handler::NotImplemented
Definition: NotImplemented.h:24
SWC::Comm::ConnHandlerPtr
std::shared_ptr< ConnHandler > ConnHandlerPtr
Definition: AppContext.h:17
SWC::Comm::Buffers::make
static SWC_CAN_INLINE Ptr make(uint32_t reserve=0)
Definition: Buffers.h:27
SWC::Comm::Protocol::Common::Handler::NotImplemented::run
void run() override
Definition: NotImplemented.h:31
SWC::Error::NOT_IMPLEMENTED
@ NOT_IMPLEMENTED
Definition: Error.h:74
SWC::Comm::Event::Ptr
std::shared_ptr< Event > Ptr
Definition: Event.h:33
SWC::Comm::Protocol::Common::Handler::NotImplemented::NotImplemented
NotImplemented(const ConnHandlerPtr &conn, const Event::Ptr &ev)
Definition: NotImplemented.h:27