0.45.1
C++ Standard Airline IT Object Library
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
STDAIR_Service.hpp
Go to the documentation of this file.
1
12
#ifndef __STDAIR_STDAIR_HPP
13
#define __STDAIR_STDAIR_HPP
14
15
// //////////////////////////////////////////////////////////////////////
16
// Import section
17
// //////////////////////////////////////////////////////////////////////
18
// STL
19
#include <string>
20
// StdAir
21
#include <
stdair/stdair_inventory_types.hpp
>
22
#include <
stdair/stdair_service_types.hpp
>
23
#include <
stdair/basic/BasLogParams.hpp
>
24
#include <
stdair/basic/BasDBParams.hpp
>
25
#include <
stdair/basic/ServiceInitialisationType.hpp
>
26
#include <
stdair/basic/EventType.hpp
>
27
#include <
stdair/bom/TravelSolutionTypes.hpp
>
28
29
namespace
stdair {
30
32
class
BomRoot;
33
class
EventQueue;
34
class
EventStruct;
35
struct
ProgressStatusSet;
36
struct
BookingRequestStruct;
37
class
STDAIR_ServiceContext;
38
39
43
class
STDAIR_Service
{
44
public
:
45
// ////////// Constructors and destructors //////////
49
STDAIR_Service
();
50
62
STDAIR_Service
(
const
BasLogParams
&);
63
79
STDAIR_Service
(
const
BasLogParams
&,
const
BasDBParams
&);
80
84
~STDAIR_Service
();
85
86
87
public
:
88
// ////////////////// Business support methods //////////////////
108
void
buildSampleBom
();
109
131
void
buildDummyInventory
(
const
CabinCapacity_T
& iCabinCapacity);
132
147
void
buildSampleTravelSolutionForPricing
(
TravelSolutionList_T
&);
148
166
void
buildSampleTravelSolutions
(
TravelSolutionList_T
&);
167
196
BookingRequestStruct
buildSampleBookingRequest
(
const
bool
isForCRS =
false
);
197
212
const
Count_T
&
getExpectedTotalNumberOfEventsToBeGenerated
()
const
;
213
230
const
Count_T
&
231
getExpectedTotalNumberOfEventsToBeGenerated
(
const
EventType::EN_EventType
&)
const
;
232
245
const
Count_T
&
getActualTotalNumberOfEventsToBeGenerated
()
const
;
246
260
const
Count_T
&
261
getActualTotalNumberOfEventsToBeGenerated
(
const
EventType::EN_EventType
&)
const
;
262
279
ProgressStatusSet
popEvent
(
EventStruct
&)
const
;
280
286
bool
isQueueDone
()
const
;
287
292
void
reset
()
const
;
293
294
295
public
:
296
// //////////////// Export support methods /////////////////
306
std::string
jsonExport
(
const
AirlineCode_T
&,
const
FlightNumber_T
&,
307
const
Date_T
& iDepartureDate)
const
;
308
309
310
public
:
311
// //////////////// Display support methods /////////////////
325
std::string
list
(
const
AirlineCode_T
& iAirlineCode =
"all"
,
326
const
FlightNumber_T
& iFlightNumber = 0)
const
;
327
334
std::string
listAirportPairDateRange
()
const
;
335
345
bool
check
(
const
AirlineCode_T
&,
const
FlightNumber_T
&,
346
const
Date_T
& iDepartureDate)
const
;
347
360
bool
check
(
const
AirportCode_T
&,
const
AirportCode_T
&,
361
const
Date_T
& iDepartureDate)
const
;
362
370
std::string
csvDisplay
()
const
;
371
381
std::string
csvDisplay
(
const
AirlineCode_T
&,
const
FlightNumber_T
&,
382
const
Date_T
& iDepartureDate)
const
;
383
391
std::string
csvDisplay
(
const
TravelSolutionList_T
&)
const
;
392
403
std::string
csvDisplay
(
const
AirportCode_T
&,
const
AirportCode_T
&,
404
const
Date_T
& iDepartureDate)
const
;
405
406
407
public
:
408
// ///////////////// Getters ///////////////////
417
BomRoot
&
getBomRoot
()
const
;
418
427
EventQueue
&
getEventQueue
()
const
;
428
434
BasLogParams
getLogParams
()
const
;
435
442
const
BasDBParams
&
getDBParams
()
const
;
443
452
const
ServiceInitialisationType
&
getServiceInitialisationType
()
const
;
453
454
455
private
:
456
// /////// Construction and Destruction helper methods ///////
463
STDAIR_Service
(
const
STDAIR_Service
&);
464
469
void
initServiceContext();
470
488
void
logInit (
const
BasLogParams
&);
489
495
void
dbInit (
const
BasDBParams
&);
496
512
void
init();
513
517
void
finalise();
518
519
520
private
:
521
// ///////// Service Context /////////
525
STDAIR_ServiceContext
* _stdairServiceContext;
526
};
527
}
528
#endif // __STDAIR_STDAIR_HPP
Generated on Thu Aug 16 2012 03:18:50 for StdAir by
1.8.1.2