AirInv Logo  1.00.0
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DCPEventStruct.hpp
Go to the documentation of this file.
1 #ifndef __AIRINV_BOM_DCPEVENTSTRUCT_HPP
2 #define __AIRINV_BOM_DCPEVENTSTRUCT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 #include <vector>
10 // StdAir
11 #include <stdair/stdair_demand_types.hpp>
12 #include <stdair/stdair_inventory_types.hpp>
13 #include <stdair/basic/StructAbstract.hpp>
14 #include <stdair/basic/BasParserTypes.hpp>
15 // AirInv
16 #include <airinv/AIRINV_Types.hpp>
17 
18 namespace AIRINV {
19 
21  struct DCPEventStruct : public stdair::StructAbstract {
22  public:
23 
25  DCPEventStruct ();
26 
28  stdair::Date_T getDate() const;
29 
31  stdair::Duration_T getTime() const;
32 
34  const std::string describe() const;
35 
37  const unsigned int getAirlineListSize () const {
38  return _airlineCodeList.size();
39  }
40 
42  const unsigned int getClassCodeListSize () const {
43  return _classCodeList.size();
44  }
45 
47  const stdair::AirlineCode_T& getFirstAirlineCode () const;
48 
52  void beginAirline ();
53 
56  bool hasNotReachedEndAirline () const;
57 
59  stdair::AirlineCode_T getCurrentAirlineCode () const;
60 
63  void iterateAirline ();
64 
66  const std::string& getFirstClassCode () const;
67 
71  void beginClassCode ();
72 
75  bool hasNotReachedEndClassCode () const;
76 
78  std::string getCurrentClassCode () const;
79 
82  void iterateClassCode ();
83 
84  public:
85  // ////////////////// Attributes /////////////////
87  stdair::year_t _itYear;
88  stdair::month_t _itMonth;
89  stdair::day_t _itDay;
90 
92  //long _itHours;
93  stdair::hour_t _itHours;
94  stdair::minute_t _itMinutes;
95  stdair::second_t _itSeconds;
96 
98  stdair::AirlineCodeList_T::iterator _itCurrentAirlineCode;
99 
101  stdair::ClassList_StringList_T::iterator _itCurrentClassCode;
102 
104  stdair::AirportCode_T _origin;
105 
107  stdair::AirportCode_T _destination;
108 
110  stdair::Date_T _dateRangeStart;
111 
113  stdair::Date_T _dateRangeEnd;
114 
116  stdair::Duration_T _timeRangeStart;
117 
119  stdair::Duration_T _timeRangeEnd;
120 
122  stdair::CabinCode_T _cabinCode;
123 
125  stdair::CityCode_T _pos;
126 
128  stdair::ChannelLabel_T _channel;
129 
131  stdair::DayDuration_T _advancePurchase;
132 
134  stdair::SaturdayStay_T _saturdayStay;
135 
137  stdair::ChangeFees_T _changeFees;
138 
140  stdair::NonRefundable_T _nonRefundable;
141 
143  stdair::DayDuration_T _minimumStay;
144 
146  stdair::PriceValue_T _DCP;
147 
149  stdair::AirlineCode_T _airlineCode;
150 
152  stdair::ClassCode_T _classCode;
153 
155  stdair::AirlineCodeList_T _airlineCodeList;
156 
158  //unsigned long int _nbOfAirlines;
159 
161  stdair::ClassList_StringList_T _classCodeList;
162 
163  };
164 
165 }
166 #endif // __AIRINV_BOM_DCPEVENTSTRUCT_HPP