1.00.15
C++ Simulated Airline Inventory Management System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
AIRINV_Master_Service.hpp
Go to the documentation of this file.
1
#ifndef __AIRINV_SVC_AIRINV_MASTER_SERVICE_HPP
2
#define __AIRINV_SVC_AIRINV_MASTER_SERVICE_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <string>
9
// StdAir
10
#include <stdair/stdair_basic_types.hpp>
11
#include <stdair/stdair_file.hpp>
12
#include <stdair/stdair_service_types.hpp>
13
#include <stdair/stdair_inventory_types.hpp>
14
#include <stdair/stdair_maths_types.hpp>
15
#include <stdair/bom/BomIDTypes.hpp>
16
// AirRAC
17
#include <airrac/AIRRAC_Types.hpp>
18
// SEvMgr
19
#include <sevmgr/SEVMGR_Types.hpp>
20
// AirInv
21
#include <
airinv/AIRINV_Types.hpp
>
22
23
25
namespace
stdair
{
26
class
BomRoot;
27
class
AirlineFeatureSet;
28
class
Inventory;
29
class
JSONString;
30
class
STDAIR_Service;
31
struct
BasLogParams;
32
struct
BasDBParams;
33
struct
SnapshotStruct;
34
struct
RMEventStruct;
35
struct
TravelSolutionStruct;
36
}
37
38
namespace
AIRINV
{
39
41
class
AIRINV_Master_ServiceContext
;
42
43
47
class
AIRINV_Master_Service
{
48
public
:
49
// ////////// Constructors and destructors //////////
65
AIRINV_Master_Service
(
const
stdair::BasLogParams&,
66
const
stdair::BasDBParams&);
67
79
AIRINV_Master_Service
(
const
stdair::BasLogParams&);
80
96
AIRINV_Master_Service
(stdair::STDAIR_ServicePtr_T);
97
114
AIRINV_Master_Service
(stdair::STDAIR_ServicePtr_T,
115
SEVMGR::SEVMGR_ServicePtr_T);
116
125
void
parseAndLoad
(
const
InventoryFilePath
&);
126
139
void
parseAndLoad
(
const
stdair::ScheduleFilePath&,
140
const
stdair::ODFilePath&,
141
const
stdair::FRAT5FilePath&,
142
const
stdair::FFDisutilityFilePath&,
143
const
AIRRAC::YieldFilePath&);
144
148
~AIRINV_Master_Service
();
149
154
void
initSnapshotAndRMEvents
(
const
stdair::Date_T&,
const
stdair::Date_T&);
155
156
157
public
:
158
// /////////// Business Methods /////////////
166
void
buildSampleBom
();
167
171
void
clonePersistentBom
();
172
177
void
buildComplementaryLinks
(stdair::BomRoot&);
178
182
void
calculateAvailability
(stdair::TravelSolutionStruct&);
183
192
bool
sell
(
const
std::string& iSegmentDateKey,
const
stdair::ClassCode_T&,
193
const
stdair::PartySize_T&);
194
202
bool
sell
(
const
stdair::BookingClassID_T&,
const
stdair::PartySize_T&);
203
213
bool
cancel
(
const
std::string& iSegmentDateKey,
const
stdair::ClassCode_T&,
214
const
stdair::PartySize_T&);
215
223
bool
cancel
(
const
stdair::BookingClassID_T&,
const
stdair::PartySize_T&);
224
228
void
takeSnapshots
(
const
stdair::SnapshotStruct&);
229
233
void
optimise
(
const
stdair::RMEventStruct&);
234
235
236
public
:
237
238
// //////////////// Export support methods /////////////////
248
std::string
jsonHandler
(
const
stdair::JSONString&)
const
;
249
262
std::string
jsonExportFlightDateList
(
const
stdair::AirlineCode_T& iAirlineCode =
"all"
,
263
const
stdair::FlightNumber_T& iFlightNumber = 0)
const
;
264
275
std::string
jsonExportFlightDateObjects
(
const
stdair::AirlineCode_T&,
276
const
stdair::FlightNumber_T&,
277
const
stdair::Date_T& iDepartureDate)
const
;
278
279
280
public
:
281
// //////////////// Display support methods /////////////////
295
std::string
list
(
const
stdair::AirlineCode_T& iAirlineCode =
"all"
,
296
const
stdair::FlightNumber_T& iFlightNumber = 0)
const
;
297
307
bool
check
(
const
stdair::AirlineCode_T&,
const
stdair::FlightNumber_T&,
308
const
stdair::Date_T& iDepartureDate)
const
;
309
317
std::string
csvDisplay
()
const
;
318
330
std::string
csvDisplay
(
const
stdair::AirlineCode_T&,
331
const
stdair::FlightNumber_T&,
332
const
stdair::Date_T& iDepartureDate)
const
;
333
334
335
private
:
336
// /////// Construction and Destruction helper methods ///////
340
AIRINV_Master_Service
();
341
345
AIRINV_Master_Service
(
const
AIRINV_Master_Service
&);
346
356
stdair::STDAIR_ServicePtr_T initStdAirService (
const
stdair::BasLogParams&,
357
const
stdair::BasDBParams&);
358
367
stdair::STDAIR_ServicePtr_T initStdAirService (
const
stdair::BasLogParams&);
368
377
void
addStdAirService (stdair::STDAIR_ServicePtr_T,
378
const
bool
iOwnStdairService);
379
385
void
addSEVMGRService (SEVMGR::SEVMGR_ServicePtr_T ioSEVMGR_ServicePtr,
386
const
bool
iOwnSEVMGRService);
387
388
393
void
initServiceContext();
394
401
void
initSlaveAirinvService();
402
406
void
finalise();
407
408
409
private
:
410
// ///////// Service Context /////////
414
AIRINV_Master_ServiceContext
* _airinvMasterServiceContext;
415
};
416
}
417
#endif
// __AIRINV_SVC_AIRINV_MASTER_SERVICE_HPP
AIRINV_Types.hpp
AIRINV::AIRINV_Master_ServiceContext
Definition
AIRINV_Master_ServiceContext.hpp:28
AIRINV::AIRINV_Master_Service::csvDisplay
std::string csvDisplay() const
Definition
AIRINV_Master_Service.cpp:598
AIRINV::AIRINV_Master_Service::buildSampleBom
void buildSampleBom()
Definition
AIRINV_Master_Service.cpp:291
AIRINV::AIRINV_Master_Service::~AIRINV_Master_Service
~AIRINV_Master_Service()
Definition
AIRINV_Master_Service.cpp:127
AIRINV::AIRINV_Master_Service::jsonExportFlightDateObjects
std::string jsonExportFlightDateObjects(const stdair::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const
Definition
AIRINV_Master_Service.cpp:521
AIRINV::AIRINV_Master_Service::buildComplementaryLinks
void buildComplementaryLinks(stdair::BomRoot &)
Definition
AIRINV_Master_Service.cpp:466
AIRINV::AIRINV_Master_Service::initSnapshotAndRMEvents
void initSnapshotAndRMEvents(const stdair::Date_T &, const stdair::Date_T &)
Definition
AIRINV_Master_Service.cpp:647
AIRINV::AIRINV_Master_Service::calculateAvailability
void calculateAvailability(stdair::TravelSolutionStruct &)
Definition
AIRINV_Master_Service.cpp:684
AIRINV::AIRINV_Master_Service::AIRINV_Master_Service
AIRINV_Master_Service(const stdair::BasLogParams &, const stdair::BasDBParams &)
Definition
AIRINV_Master_Service.cpp:46
AIRINV::AIRINV_Master_Service::optimise
void optimise(const stdair::RMEventStruct &)
Definition
AIRINV_Master_Service.cpp:907
AIRINV::AIRINV_Master_Service::takeSnapshots
void takeSnapshots(const stdair::SnapshotStruct &)
Definition
AIRINV_Master_Service.cpp:881
AIRINV::AIRINV_Master_Service::jsonHandler
std::string jsonHandler(const stdair::JSONString &) const
Definition
AIRINV_Master_Service.cpp:472
AIRINV::AIRINV_Master_Service::sell
bool sell(const std::string &iSegmentDateKey, const stdair::ClassCode_T &, const stdair::PartySize_T &)
Definition
AIRINV_Master_Service.cpp:714
AIRINV::AIRINV_Master_Service::list
std::string list(const stdair::AirlineCode_T &iAirlineCode="all", const stdair::FlightNumber_T &iFlightNumber=0) const
Definition
AIRINV_Master_Service.cpp:548
AIRINV::AIRINV_Master_Service::parseAndLoad
void parseAndLoad(const InventoryFilePath &)
Definition
AIRINV_Master_Service.cpp:255
AIRINV::AIRINV_Master_Service::check
bool check(const stdair::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const
Definition
AIRINV_Master_Service.cpp:573
AIRINV::AIRINV_Master_Service::jsonExportFlightDateList
std::string jsonExportFlightDateList(const stdair::AirlineCode_T &iAirlineCode="all", const stdair::FlightNumber_T &iFlightNumber=0) const
Definition
AIRINV_Master_Service.cpp:496
AIRINV::AIRINV_Master_Service::cancel
bool cancel(const std::string &iSegmentDateKey, const stdair::ClassCode_T &, const stdair::PartySize_T &)
Definition
AIRINV_Master_Service.cpp:797
AIRINV::AIRINV_Master_Service::clonePersistentBom
void clonePersistentBom()
Definition
AIRINV_Master_Service.cpp:415
AIRINV::InventoryFilePath
Definition
AIRINV_Types.hpp:198
AIRINV
Definition
AIRINV_Master_Service.hpp:38
stdair
Forward declarations.
Definition
AIRINV_Master_Service.hpp:25
Generated on
for AirInv by
1.17.0