1.01.14
C++ Simulated Travel-Oriented Distribution System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
SIMCRS_Service.hpp
Go to the documentation of this file.
1
#ifndef __SIMCRS_SVC_SIMCRS_SERVICE_HPP
2
#define __SIMCRS_SVC_SIMCRS_SERVICE_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// StdAir
8
#include <stdair/stdair_basic_types.hpp>
9
#include <stdair/stdair_file.hpp>
10
#include <stdair/stdair_service_types.hpp>
11
#include <stdair/bom/TravelSolutionTypes.hpp>
12
// SEvMgr
13
#include <sevmgr/SEVMGR_Types.hpp>
14
// SimFQT
15
#include <simfqt/SIMFQT_Types.hpp>
16
// AIRRAC
17
#include <airrac/AIRRAC_Types.hpp>
18
// SimCRS
19
#include <
simcrs/SIMCRS_Types.hpp
>
20
22
namespace
stdair
{
23
class
BomRoot;
24
struct
BasLogParams;
25
struct
BasDBParams;
26
struct
BookingRequestStruct;
27
struct
CancellationStruct;
28
struct
SnapshotStruct;
29
struct
RMEventStruct;
30
class
JSONString;
31
}
32
33
namespace
SIMCRS
{
34
36
class
SIMCRS_ServiceContext
;
37
38
42
class
SIMCRS_Service
{
43
public
:
44
// ////////////////// Constructors and Destructors //////////////////
61
SIMCRS_Service
(
const
stdair::BasLogParams&,
const
stdair::BasDBParams&,
62
const
CRSCode_T
&);
63
76
SIMCRS_Service
(
const
stdair::BasLogParams&,
const
CRSCode_T
&);
77
96
SIMCRS_Service
(stdair::STDAIR_ServicePtr_T, SEVMGR::SEVMGR_ServicePtr_T,
97
const
CRSCode_T
&);
98
99
113
void
parseAndLoad
(
const
stdair::ScheduleFilePath&,
114
const
stdair::ODFilePath&,
115
const
stdair::FRAT5FilePath&,
116
const
stdair::FFDisutilityFilePath&,
117
const
AIRRAC::YieldFilePath&,
118
const
SIMFQT::FareFilePath&);
119
126
void
initSnapshotAndRMEvents
(
const
stdair::Date_T& iStartDate,
127
const
stdair::Date_T& iEndDate);
128
132
~SIMCRS_Service
();
133
134
135
public
:
136
// /////////////// Business Methods /////////////////
141
stdair::TravelSolutionList_T
142
calculateSegmentPathList
(
const
stdair::BookingRequestStruct&);
143
147
void
fareQuote
(
const
stdair::BookingRequestStruct&,
148
stdair::TravelSolutionList_T&);
149
153
void
calculateAvailability
(stdair::TravelSolutionList_T&);
154
158
bool
sell
(
const
stdair::TravelSolutionStruct&,
const
stdair::PartySize_T&);
159
163
void
takeSnapshots
(
const
stdair::SnapshotStruct&);
164
168
bool
playCancellation
(
const
stdair::CancellationStruct&);
169
173
void
optimise
(
const
stdair::RMEventStruct&);
174
183
bool
sell
(
const
std::string& iSegmentDateKey,
const
stdair::ClassCode_T&,
184
const
stdair::PartySize_T&);
185
195
void
buildSampleBom
();
196
200
void
clonePersistentBom
();
201
206
void
buildComplementaryLinks
(stdair::BomRoot&);
207
227
void
buildSampleTravelSolutions
(stdair::TravelSolutionList_T&);
228
259
stdair::BookingRequestStruct
260
buildSampleBookingRequest
(
const
bool
isForCRS =
false
);
261
262
263
public
:
264
// //////////////// Export support methods /////////////////
274
std::string
jsonHandler
(
const
stdair::JSONString&)
const
;
275
276
public
:
277
// //////////////// Display support methods /////////////////
285
std::string
csvDisplay
()
const
;
286
294
std::string
csvDisplay
(
const
stdair::TravelSolutionList_T&)
const
;
295
309
std::string
list
(
const
stdair::AirlineCode_T& iAirlineCode =
"all"
,
310
const
stdair::FlightNumber_T& iFlightNumber = 0)
const
;
311
323
std::string
csvDisplay
(
const
stdair::AirlineCode_T&,
324
const
stdair::FlightNumber_T&,
325
const
stdair::Date_T& iDepartureDate)
const
;
326
327
328
private
:
329
// /////// Construction and Destruction helper methods ///////
333
SIMCRS_Service
();
334
338
SIMCRS_Service
(
const
SIMCRS_Service
&);
339
349
stdair::STDAIR_ServicePtr_T initStdAirService (
const
stdair::BasLogParams&,
350
const
stdair::BasDBParams&);
351
361
stdair::STDAIR_ServicePtr_T initStdAirService (
const
stdair::BasLogParams&);
362
366
void
initAIRTSPService();
367
371
void
initSIMFQTService();
372
376
void
initAIRINVService();
377
386
void
addStdAirService (stdair::STDAIR_ServicePtr_T,
387
const
bool
iOwnStdairService);
388
394
void
addSEVMGRService (SEVMGR::SEVMGR_ServicePtr_T,
395
const
bool
iOwnSEVMGRService);
396
403
void
initServiceContext (
const
CRSCode_T
&);
404
409
void
initSimcrsService();
410
414
void
finalise();
415
416
417
private
:
418
// ///////// Service Context /////////
422
SIMCRS_ServiceContext
* _simcrsServiceContext;
423
};
424
}
425
#endif
// __SIMCRS_SVC_SIMCRS_SERVICE_HPP
SIMCRS_Types.hpp
SIMCRS::SIMCRS_ServiceContext
Class holding the context of the Simcrs services.
Definition
SIMCRS_ServiceContext.hpp:32
SIMCRS::SIMCRS_Service::parseAndLoad
void parseAndLoad(const stdair::ScheduleFilePath &, const stdair::ODFilePath &, const stdair::FRAT5FilePath &, const stdair::FFDisutilityFilePath &, const AIRRAC::YieldFilePath &, const SIMFQT::FareFilePath &)
Definition
SIMCRS_Service.cpp:324
SIMCRS::SIMCRS_Service::sell
bool sell(const stdair::TravelSolutionStruct &, const stdair::PartySize_T &)
Definition
SIMCRS_Service.cpp:839
SIMCRS::SIMCRS_Service::initSnapshotAndRMEvents
void initSnapshotAndRMEvents(const stdair::Date_T &iStartDate, const stdair::Date_T &iEndDate)
Definition
SIMCRS_Service.cpp:635
SIMCRS::SIMCRS_Service::takeSnapshots
void takeSnapshots(const stdair::SnapshotStruct &)
Definition
SIMCRS_Service.cpp:925
SIMCRS::SIMCRS_Service::buildComplementaryLinks
void buildComplementaryLinks(stdair::BomRoot &)
Definition
SIMCRS_Service.cpp:548
SIMCRS::SIMCRS_Service::list
std::string list(const stdair::AirlineCode_T &iAirlineCode="all", const stdair::FlightNumber_T &iFlightNumber=0) const
Definition
SIMCRS_Service.cpp:695
SIMCRS::SIMCRS_Service::csvDisplay
std::string csvDisplay() const
Definition
SIMCRS_Service.cpp:654
SIMCRS::SIMCRS_Service::optimise
void optimise(const stdair::RMEventStruct &)
Definition
SIMCRS_Service.cpp:944
SIMCRS::SIMCRS_Service::calculateSegmentPathList
stdair::TravelSolutionList_T calculateSegmentPathList(const stdair::BookingRequestStruct &)
Definition
SIMCRS_Service.cpp:739
SIMCRS::SIMCRS_Service::buildSampleBom
void buildSampleBom()
Definition
SIMCRS_Service.cpp:402
SIMCRS::SIMCRS_Service::buildSampleTravelSolutions
void buildSampleTravelSolutions(stdair::TravelSolutionList_T &)
Definition
SIMCRS_Service.cpp:554
SIMCRS::SIMCRS_Service::jsonHandler
std::string jsonHandler(const stdair::JSONString &) const
Definition
SIMCRS_Service.cpp:615
SIMCRS::SIMCRS_Service::~SIMCRS_Service
~SIMCRS_Service()
Definition
SIMCRS_Service.cpp:144
SIMCRS::SIMCRS_Service::clonePersistentBom
void clonePersistentBom()
Definition
SIMCRS_Service.cpp:481
SIMCRS::SIMCRS_Service::fareQuote
void fareQuote(const stdair::BookingRequestStruct &, stdair::TravelSolutionList_T &)
Definition
SIMCRS_Service.cpp:775
SIMCRS::SIMCRS_Service::playCancellation
bool playCancellation(const stdair::CancellationStruct &)
Definition
SIMCRS_Service.cpp:886
SIMCRS::SIMCRS_Service::calculateAvailability
void calculateAvailability(stdair::TravelSolutionList_T &)
Definition
SIMCRS_Service.cpp:806
SIMCRS::SIMCRS_Service::buildSampleBookingRequest
stdair::BookingRequestStruct buildSampleBookingRequest(const bool isForCRS=false)
Definition
SIMCRS_Service.cpp:574
SIMCRS::SIMCRS_Service::SIMCRS_Service
SIMCRS_Service(const stdair::BasLogParams &, const stdair::BasDBParams &, const CRSCode_T &)
Definition
SIMCRS_Service.cpp:81
SIMCRS
Definition
BasConst.cpp:7
SIMCRS::CRSCode_T
std::string CRSCode_T
Definition
SIMCRS_Types.hpp:39
stdair
Forward declarations.
Definition
DistributionManager.hpp:16
Generated on
for SimCRS by
1.17.0