Covalent Bond  0.0.1-alpha
'covalent bond' is a data middle office. As a 2022-2023 Fall SWE final project.
cbRestfulHttpServer.hpp
Go to the documentation of this file.
1 
12 #ifndef __UTILS_CB_RESTFUL_HTTP_SERVER_HPP_
13 #define __UTILS_CB_RESTFUL_HTTP_SERVER_HPP_
14 
15 #ifdef _WIN32
16 #if _MSC_VER > 1000
17 #pragma once
18 #endif
19 #endif
20 
21 #if defined(__unix__) && defined(__clang__)
22 #pragma once
23 #endif
24 
25 #include "../pch.hpp"
26 
27 #include <workflow/WFFacilities.h>
28 #include <wfrest/HttpServer.h>
29 
30 using namespace wfrest;
31 
32 namespace cb {
33 namespace utils {
34 
36  public:
38  cbRestfulHttpServer(unsigned short port);
39 
40  void execMain();
41 
42  void stopMain();
43 
44  HttpServer& operator()();
45 
46  private:
47  HttpServer* m_svr;
48  unsigned short m_port;
49 };
50 
51 } // namespace utils
52 } // namespace cb
53 
54 #endif //! __UTILS_CB_RESTFUL_HTTP_SERVER_HPP_
cb::utils::cbRestfulHttpServer
Definition: cbRestfulHttpServer.hpp:35
cb
_WIN32
Definition: api.cpp:4
cb::utils::cbRestfulHttpServer::m_svr
HttpServer * m_svr
Definition: cbRestfulHttpServer.hpp:47
cb::utils::cbRestfulHttpServer::m_port
unsigned short m_port
Definition: cbRestfulHttpServer.hpp:48