AirInv Logo  1.00.12
C++ Simulated Airline Inventory Management System Library
Loading...
Searching...
No Matches
DCPEventGenerator.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// STL
5#include <cassert>
6// StdAir
7#include <stdair/bom/BomManager.hpp>
8#include <stdair/bom/BomRoot.hpp>
9#include <stdair/factory/FacBomManager.hpp>
10#include <stdair/service/Logger.hpp>
11// AirInv
13#include <airinv/command/DCPEventGenerator.hpp>
14
15namespace AIRINV {
16
17 // //////////////////////////////////////////////////////////////////////
18 void DCPEventGenerator::
19 createDCPEvent (stdair::BomRoot& ioBomRoot,
20 DCPEventStruct& iDCPEventStruct) {
21
22 // Set the airport-pair primary key.
23 /*
24 const stdair::AirportCode_T& lBoardPoint = iDCPEventStruct._origin;
25 const stdair::AirportCode_T& lOffPoint = iDCPEventStruct._destination;
26 */
27
28 // Set the DCP date-period primary key.
29 const stdair::Date_T& lDateRangeStart = iDCPEventStruct._dateRangeStart;
30 const stdair::Date_T& lDateRangeEnd = iDCPEventStruct._dateRangeEnd;
31 const stdair::DatePeriod_T lDatePeriod (lDateRangeStart, lDateRangeEnd);
32
33 // Set the DCP time-period primary key.
34 /*
35 const stdair::Time_T& lTimeRangeStart = iDCPEventStruct._timeRangeStart;
36 const stdair::Time_T& lTimeRangeEnd = iDCPEventStruct._timeRangeEnd;
37 */
38
39 // Generate the DCPEvent
40 const stdair::DayDuration_T& lAdvancePurchase =
41 iDCPEventStruct._advancePurchase;
42 const stdair::SaturdayStay_T& lSaturdayStay = iDCPEventStruct._saturdayStay;
43 const stdair::ChangeFees_T& lChangeFees = iDCPEventStruct._changeFees;
44 const stdair::NonRefundable_T& lNonRefundable =
45 iDCPEventStruct._nonRefundable;
46 const stdair::DayDuration_T& lMinimumStay = iDCPEventStruct._minimumStay;
47 const stdair::Fare_T& lDCP = iDCPEventStruct._DCP;
48
49 // Generate Segment Features and link them to their DCPEvent
50 stdair::ClassList_StringList_T::const_iterator lItCurrentClassCodeList =
51 iDCPEventStruct._classCodeList.begin();
52
53 const unsigned int lAirlineListSize = iDCPEventStruct.getAirlineListSize();
54 const unsigned int lClassCodeListSize =
55 iDCPEventStruct.getClassCodeListSize();
56 assert (lAirlineListSize == lClassCodeListSize);
57
58 iDCPEventStruct.beginClassCode();
59 for (iDCPEventStruct.beginAirline();
60 iDCPEventStruct.hasNotReachedEndAirline();
61 iDCPEventStruct.iterateAirline()) {
62 /*
63 const stdair::AirlineCode_T& lAirlineCode =
64 iDCPEventStruct.getCurrentAirlineCode();
65 const std::string& lClassCodeList = iDCPEventStruct.getCurrentClassCode();
66 iDCPEventStruct.iterateClassCode();
67 */
68 }
69 }
70
71}
72