StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
FareFeaturesKey.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <ostream>
6 #include <sstream>
7 // StdAir
11 
12 namespace stdair {
13 
14  // ////////////////////////////////////////////////////////////////////
15  FareFeaturesKey::FareFeaturesKey()
16  : _tripType (TRIP_TYPE_ONE_WAY),
17  _advancePurchase (NO_ADVANCE_PURCHASE),
18  _saturdayStay (SATURDAY_STAY),
19  _changeFees (CHANGE_FEES),
20  _nonRefundable (NON_REFUNDABLE),
21  _minimumStay (NO_STAY_DURATION) {
22  assert (false);
23  }
24 
25  // ////////////////////////////////////////////////////////////////////
26  FareFeaturesKey::FareFeaturesKey (const TripType_T& iTripType,
27  const DayDuration_T& iAdvancePurchase,
28  const SaturdayStay_T& iSaturdayStay,
29  const ChangeFees_T& iChangeFees,
30  const NonRefundable_T& iNonRefundable,
31  const DayDuration_T& iMinimumStay)
32  : _tripType (iTripType), _advancePurchase (iAdvancePurchase),
33  _saturdayStay (iSaturdayStay), _changeFees (iChangeFees),
34  _nonRefundable (iNonRefundable), _minimumStay (iMinimumStay) {
35  }
36 
37  // ////////////////////////////////////////////////////////////////////
38  FareFeaturesKey::FareFeaturesKey (const FareFeaturesKey& iKey)
39  : _tripType (iKey.getTripType()),
40  _advancePurchase (iKey.getAdvancePurchase()),
41  _saturdayStay (iKey.getSaturdayStay()),
42  _changeFees (iKey.getChangeFees()),
43  _nonRefundable (iKey.getRefundableOption()),
44  _minimumStay (iKey.getMinimumStay()) {
45  }
46 
47  // ////////////////////////////////////////////////////////////////////
49  }
50 
51  // ////////////////////////////////////////////////////////////////////
52  void FareFeaturesKey::toStream (std::ostream& ioOut) const {
53  ioOut << "FareFeaturesKey: " << toString() << std::endl;
54  }
55 
56  // ////////////////////////////////////////////////////////////////////
57  void FareFeaturesKey::fromStream (std::istream& ioIn) {
58  }
59 
60  // ////////////////////////////////////////////////////////////////////
61  const std::string FareFeaturesKey::toString() const {
62  std::ostringstream oStr;
63  oStr << _tripType << " -- " << _advancePurchase << "-"
64  << _saturdayStay << "-" << _changeFees << "-"
65  << _nonRefundable << "-" << _minimumStay;
66  return oStr.str();
67  }
68 
69 }
const std::string toString() const
void fromStream(std::istream &ioIn)
std::string TripType_T
Handle on the StdAir library context.
void toStream(std::ostream &ioOut) const
Key of date-period.
const DayDuration_T NO_STAY_DURATION
const SaturdayStay_T SATURDAY_STAY
const TripType_T TRIP_TYPE_ONE_WAY
const NonRefundable_T NON_REFUNDABLE
const DayDuration_T NO_ADVANCE_PURCHASE
const ChangeFees_T CHANGE_FEES