1.00.15
C++ Simulated Airline Inventory Management System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
AirInvServer.hpp
Go to the documentation of this file.
1
#ifndef __AIRINV_SVR_AIRINVSERVER_HPP
2
#define __AIRINV_SVR_AIRINVSERVER_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <string>
9
#include <vector>
10
// Boost
11
#include <boost/asio.hpp>
12
#include <boost/noncopyable.hpp>
13
#include <boost/shared_ptr.hpp>
14
// StdAir
15
#include <stdair/stdair_basic_types.hpp>
16
// AirInv
17
#include <
airinv/server/Connection.hpp
>
18
#include <
airinv/server/RequestHandler.hpp
>
19
20
namespace
AIRINV
{
21
23
class
AirInvServer
:
private
boost::noncopyable {
24
public
:
25
// //////////// Constructors and Destructors /////////////////
29
AirInvServer
(
const
std::string& address,
const
std::string& port,
30
const
stdair::AirlineCode_T& iAirlineCode,
31
std::size_t thread_pool_size);
33
~AirInvServer
();
34
35
36
public
:
37
// ////////////////// Business Methods ////////////////////
39
void
run
();
40
42
void
stop
();
43
44
45
private
:
46
// //////////// Constructors and Destructors /////////////////
48
AirInvServer
();
49
AirInvServer
(
const
AirInvServer
&);
50
51
52
private
:
53
// //////////// Attributes /////////////////
55
void
handleAccept (
const
boost::system::error_code& e);
56
58
std::size_t _threadPoolSize;
59
61
boost::asio::io_service _ioService;
62
64
boost::asio::ip::tcp::acceptor _acceptor;
65
67
ConnectionShrPtr_T
_newConnection;
68
70
RequestHandler
_requestHandler;
71
};
72
73
}
74
#endif
// __AIRINV_SVR_AIRINVSERVER_HPP
Connection.hpp
RequestHandler.hpp
AIRINV::AirInvServer::~AirInvServer
~AirInvServer()
Definition
AirInvServer_ASIO.cpp:46
AIRINV::AirInvServer::run
void run()
Definition
AirInvServer_ASIO.cpp:50
AIRINV::AirInvServer::stop
void stop()
Definition
AirInvServer_ASIO.cpp:69
AIRINV::AirInvServer::AirInvServer
AirInvServer(const std::string &address, const std::string &port, const stdair::AirlineCode_T &iAirlineCode, std::size_t thread_pool_size)
Definition
AirInvServer_ASIO.cpp:20
AIRINV::RequestHandler
The common handler for all incoming requests.
Definition
RequestHandler.hpp:28
AIRINV
Definition
AIRINV_Master_Service.hpp:38
AIRINV::ConnectionShrPtr_T
boost::shared_ptr< Connection > ConnectionShrPtr_T
Definition
Connection.hpp:71
Generated on
for AirInv by
1.17.0