Go to the documentation of this file.00001 #ifndef __AIRRAC_BOM_YIELDRULESTRUCT_HPP
00002 #define __AIRRAC_BOM_YIELDRULESTRUCT_HPP
00003
00004
00005
00006
00007
00008 #include <string>
00009
00010 #include <stdair/stdair_basic_types.hpp>
00011 #include <stdair/stdair_date_time_types.hpp>
00012 #include <stdair/stdair_demand_types.hpp>
00013 #include <stdair/stdair_inventory_types.hpp>
00014 #include <stdair/basic/StructAbstract.hpp>
00015 #include <stdair/basic/BasParserHelperTypes.hpp>
00016
00017 #include <airrac/AIRRAC_Types.hpp>
00018
00019 namespace AIRRAC {
00020
00024 struct YieldRuleStruct : public stdair::StructAbstract {
00025 public:
00026
00030 YieldRuleStruct();
00031
00035 ~YieldRuleStruct();
00036
00037 public:
00038
00040 AIRRAC::YieldID_T getYieldID () const {
00041 return _yieldId;
00042 }
00043
00045 stdair::AirportCode_T getOrigin () const {
00046 return _origin;
00047 }
00048
00050 stdair::AirportCode_T getDestination () const {
00051 return _destination;
00052 }
00053
00055 stdair::TripType_T getTripType () const {
00056 return _tripType;
00057 }
00058
00060 stdair::Date_T getDateRangeStart () const {
00061 return _dateRangeStart;
00062 }
00063
00065 stdair::Date_T getDateRangeEnd () const {
00066 return _dateRangeEnd;
00067 }
00068
00070 stdair::Duration_T getTimeRangeStart () const {
00071 return _timeRangeStart;
00072 }
00073
00075 stdair::Duration_T getTimeRangeEnd () const {
00076 return _timeRangeEnd;
00077 }
00078
00080 stdair::CabinCode_T getCabinCode () const {
00081 return _cabinCode;
00082 }
00083
00085 const stdair::CityCode_T getPOS () const {
00086 return _pos;
00087 }
00088
00090 stdair::ChannelLabel_T getChannel () const {
00091 return _channel;
00092 }
00093
00095 stdair::YieldValue_T getYield () const {
00096 return _yield;
00097 }
00098
00100 stdair::AirlineCode_T getAirlineCode () const {
00101 return _airlineCode;
00102 }
00103
00105 stdair::ClassCode_T getClassCode () const {
00106 return _classCode;
00107 }
00108
00110 const unsigned int getAirlineListSize () const {
00111 return _airlineCodeList.size();
00112 }
00113
00115 const unsigned int getClassCodeListSize () const {
00116 return _classCodeList.size();
00117 }
00118
00120 stdair::AirlineCodeList_T getAirlineList () const {
00121 return _airlineCodeList;
00122 }
00123
00125 stdair::ClassList_StringList_T getClassCodeList () const {
00126 return _classCodeList;
00127 }
00128
00129 public:
00130
00132 stdair::Date_T calculateDate() const;
00133
00135 stdair::Duration_T calculateTime() const;
00136
00138 const std::string describe() const;
00139
00140 public:
00141
00143 void setYieldID (const AIRRAC::YieldID_T iYieldID) {
00144 _yieldId = iYieldID;
00145 }
00146
00148 void setOrigin (const stdair::AirportCode_T& iOrigin) {
00149 _origin = iOrigin;
00150 }
00151
00153 void setDestination (const stdair::AirportCode_T& iDestination) {
00154 _destination = iDestination;
00155 }
00156
00158 void setTripType (const stdair::TripType_T& iTripType) {
00159 _tripType = iTripType;
00160 }
00161
00163 void setDateRangeStart (const stdair::Date_T& iDateRangeStart) {
00164 _dateRangeStart = iDateRangeStart;
00165 }
00166
00168 void setDateRangeEnd (const stdair::Date_T& iDateRangeEnd) {
00169 _dateRangeEnd = iDateRangeEnd;
00170 }
00171
00173 void setTimeRangeStart (const stdair::Duration_T& iTimeRangeStart) {
00174 _timeRangeStart = iTimeRangeStart;
00175 }
00176
00178 void setTimeRangeEnd (const stdair::Duration_T& iTimeRangeEnd) {
00179 _timeRangeEnd = iTimeRangeEnd;
00180 }
00181
00183 void setCabinCode (const stdair::CabinCode_T& iCabinCode) {
00184 _cabinCode = iCabinCode;
00185 }
00186
00188 void setPOS (const stdair::CityCode_T& iPOS) {
00189 _pos = iPOS;
00190 }
00191
00193 void setChannel (const stdair::ChannelLabel_T& iChannel) {
00194 _channel = iChannel;
00195 }
00196
00198 void setYield(const stdair::YieldValue_T& iYield) {
00199 _yield = iYield;
00200 }
00201
00203 void setAirlineCode (const stdair::AirlineCode_T& iAirlineCode) {
00204 _airlineCode = iAirlineCode;
00205 }
00206
00208 void setClassCode (const stdair::ClassCode_T& iClassCode) {
00209 _classCode = iClassCode;
00210 }
00211
00213 void clearAirlineCodeList () {
00214 _airlineCodeList.clear();
00215 }
00216
00218 void clearClassCodeList () {
00219 _classCodeList.clear();
00220 }
00221
00223 void addAirlineCode (const stdair::AirlineCode_T& iAirlineCode) {
00224 _airlineCodeList.push_back (iAirlineCode);
00225 }
00226
00228 void addClassCode (const stdair::ClassCode_T& iClassCode) {
00229 _classCodeList.push_back (iClassCode);
00230 }
00231
00232 public:
00233
00235 stdair::year_t _itYear;
00236 stdair::month_t _itMonth;
00237 stdair::day_t _itDay;
00238
00240
00241 stdair::hour_t _itHours;
00242 stdair::minute_t _itMinutes;
00243 stdair::second_t _itSeconds;
00244
00245 private:
00246
00247
00249 YieldID_T _yieldId;
00250
00252 stdair::AirportCode_T _origin;
00253
00255 stdair::AirportCode_T _destination;
00256
00258 stdair::TripType_T _tripType;
00259
00261 stdair::Date_T _dateRangeStart;
00262
00264 stdair::Date_T _dateRangeEnd;
00265
00267 stdair::Duration_T _timeRangeStart;
00268
00270 stdair::Duration_T _timeRangeEnd;
00271
00273 stdair::YieldValue_T _yield;
00274
00276 stdair::CabinCode_T _cabinCode;
00277
00279 stdair::CityCode_T _pos;
00280
00282 stdair::ChannelLabel_T _channel;
00283
00285 stdair::AirlineCode_T _airlineCode;
00286
00288 stdair::ClassCode_T _classCode;
00289
00291 stdair::AirlineCodeList_T _airlineCodeList;
00292
00294 stdair::ClassList_StringList_T _classCodeList;
00295 };
00296
00297 }
00298 #endif // __AIRRAC_BOM_YIELDRULESTRUCT_HPP