AirTSP Logo  1.01.10
C++ Simulated Airline Travel Solution Provider (TSP) Library
Loading...
Searching...
No Matches
AIRTSP_ServiceContext.hpp
Go to the documentation of this file.
1#ifndef __AIRTSP_SVC_AIRTSP_SERVICE_CONTEXT_HPP
2#define __AIRTSP_SVC_AIRTSP_SERVICE_CONTEXT_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <string>
9// Boost
10#include <boost/shared_ptr.hpp>
11// StdAir
12#include <stdair/stdair_service_types.hpp>
13#include <stdair/service/ServiceAbstract.hpp>
14// AirTSP
16
17namespace AIRTSP {
18
22 class AIRTSP_ServiceContext : public stdair::ServiceAbstract {
28 friend class AIRTSP_Service;
30
31 private:
32 // ///////////////// Getters ///////////////////
36 stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
37 return _stdairService;
38 }
39
43 stdair::STDAIR_Service& getSTDAIR_Service() const;
44
48 const bool getOwnStdairServiceFlag() const {
49 return _ownStdairService;
50 }
51
52
53 private:
54 // ///////////////// Setters ///////////////////
58 void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
59 const bool iOwnStdairService) {
60 _stdairService = ioSTDAIR_ServicePtr;
61 _ownStdairService = iOwnStdairService;
62 }
63
64
65 private:
66 // //////////////////// Display Methods /////////////////////
70 const std::string shortDisplay() const;
71
75 const std::string display() const;
76
80 const std::string describe() const;
81
82
83 private:
85
88 AIRTSP_ServiceContext();
89
93 AIRTSP_ServiceContext (const AIRTSP_ServiceContext&);
94
98 void init();
99
103 ~AIRTSP_ServiceContext();
104
108 void reset();
109
110
111 private:
112 // /////////////// Children ///////////////
116 stdair::STDAIR_ServicePtr_T _stdairService;
117
121 bool _ownStdairService;
122 };
123
124}
125#endif // __AIRTSP_SVC_AIRTSP_SERVICE_CONTEXT_HPP
Class holding the context of the Airtsp services.
Interface for the Airtsp Services.
Factory for the service context.