TraDemGen Logo  1.00.9
C++ Simulated Travel Demand Generation Library
Loading...
Searching...
No Matches
TRADEMGEN_ServiceContext.hpp
Go to the documentation of this file.
1#ifndef __TRADEMGEN_SVC_TRADEMGENSERVICECONTEXT_HPP
2#define __TRADEMGEN_SVC_TRADEMGENSERVICECONTEXT_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_basic_types.hpp>
13#include <stdair/stdair_service_types.hpp>
14#include <stdair/basic/RandomGeneration.hpp>
15#include <stdair/bom/BookingRequestTypes.hpp>
16#include <stdair/service/ServiceAbstract.hpp>
17// SEvMgr
18#include <sevmgr/SEVMGR_Types.hpp>
19// TraDemGen
22
23// Forward declarations
24namespace stdair {
25 struct DemandCharacteristics;
26 struct DemandDistribution;
27}
28
29namespace TRADEMGEN {
30
34 class TRADEMGEN_ServiceContext : public stdair::ServiceAbstract {
40 friend class TRADEMGEN_Service;
42
43 private:
44 // ///////// Getters //////////
48 stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
49 return _stdairService;
50 }
51
55 stdair::STDAIR_Service& getSTDAIR_Service() const {
56 assert (_stdairService != NULL);
57 return *_stdairService;
58 }
59
63 const bool getOwnStdairServiceFlag() const {
64 return _ownStdairService;
65 }
66
70 stdair::RandomGeneration& getUniformGenerator() {
71 return _uniformGenerator;
72 }
73
77 const POSProbabilityMass_T& getPOSProbabilityMass() const {
78 return _posProbabilityMass;
79 }
80
84 SEVMGR::SEVMGR_ServicePtr_T getSEVMGR_ServicePtr() const {
85 return _sevmgrService;
86 }
87
91 SEVMGR::SEVMGR_Service& getSEVMGR_Service() const {
92 assert (_sevmgrService != NULL);
93 return *_sevmgrService;
94 }
95
96
97 private:
98 // ///////// Setters //////////
102 void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
103 const bool iOwnStdairService) {
104 _stdairService = ioSTDAIR_ServicePtr;
105 _ownStdairService = iOwnStdairService;
106 }
107
111 void setSEVMGR_Service (SEVMGR::SEVMGR_ServicePtr_T ioSEVMGR_ServicePtr) {
112 _sevmgrService = ioSEVMGR_ServicePtr;
113 }
114
115
116 private:
117 // ///////// Display Methods //////////
121 const std::string shortDisplay() const;
122
126 const std::string display() const;
127
131 const std::string describe() const;
132
133
134 private:
136
139 TRADEMGEN_ServiceContext (const stdair::RandomSeed_T&);
143 TRADEMGEN_ServiceContext();
147 TRADEMGEN_ServiceContext (const TRADEMGEN_ServiceContext&);
148
152 ~TRADEMGEN_ServiceContext();
153
157 void reset();
158
159
160 private:
161 // /////////////// Children ///////////////
165 stdair::STDAIR_ServicePtr_T _stdairService;
166
170 SEVMGR::SEVMGR_ServicePtr_T _sevmgrService;
171
175 bool _ownStdairService;
176
177
178 private:
179 // ////////////// Attributes ////////////////
186 stdair::RandomGeneration _uniformGenerator;
187
191 const POSProbabilityMass_T _posProbabilityMass;
192 };
193
194}
195#endif // __TRADEMGEN_SVC_TRADEMGENSERVICECONTEXT_HPP
CategoricalAttributeLite< stdair::AirportCode_T > POSProbabilityMass_T
Forward declarations.
Factory for creating the TraDemGen service context instance.
Class holding the context of the Trademgen services.
class holding the services related to Travel Demand Generation.