Go to the documentation of this file.00001
00002
00003
00004
00005 #include <ostream>
00006 #include <sstream>
00007
00008 #include <stdair/basic/BasConst_DefaultObject.hpp>
00009 #include <stdair/basic/BasConst_Request.hpp>
00010 #include <stdair/bom/FareFeaturesKey.hpp>
00011
00012 namespace stdair {
00013
00014
00015 FareFeaturesKey::FareFeaturesKey()
00016 : _tripType (TRIP_TYPE_ONE_WAY),
00017 _advancePurchase (NO_ADVANCE_PURCHASE),
00018 _saturdayStay (SATURDAY_STAY),
00019 _changeFees (CHANGE_FEES),
00020 _nonRefundable (NON_REFUNDABLE),
00021 _minimumStay (NO_STAY_DURATION) {
00022 assert (false);
00023 }
00024
00025
00026 FareFeaturesKey::FareFeaturesKey (const TripType_T& iTripType,
00027 const DayDuration_T& iAdvancePurchase,
00028 const SaturdayStay_T& iSaturdayStay,
00029 const ChangeFees_T& iChangeFees,
00030 const NonRefundable_T& iNonRefundable,
00031 const DayDuration_T& iMinimumStay)
00032 : _tripType (iTripType), _advancePurchase (iAdvancePurchase),
00033 _saturdayStay (iSaturdayStay), _changeFees (iChangeFees),
00034 _nonRefundable (iNonRefundable), _minimumStay (iMinimumStay) {
00035 }
00036
00037
00038 FareFeaturesKey::FareFeaturesKey (const FareFeaturesKey& iKey)
00039 : _tripType (iKey.getTripType()),
00040 _advancePurchase (iKey.getAdvancePurchase()),
00041 _saturdayStay (iKey.getSaturdayStay()),
00042 _changeFees (iKey.getChangeFees()),
00043 _nonRefundable (iKey.getRefundableOption()),
00044 _minimumStay (iKey.getMinimumStay()) {
00045 }
00046
00047
00048 FareFeaturesKey::~FareFeaturesKey() {
00049 }
00050
00051
00052 void FareFeaturesKey::toStream (std::ostream& ioOut) const {
00053 ioOut << "FareFeaturesKey: " << toString() << std::endl;
00054 }
00055
00056
00057 void FareFeaturesKey::fromStream (std::istream& ioIn) {
00058 }
00059
00060
00061 const std::string FareFeaturesKey::toString() const {
00062 std::ostringstream oStr;
00063 oStr << _tripType << " -- " << _advancePurchase << "-"
00064 << _saturdayStay << "-" << _changeFees << "-"
00065 << _nonRefundable << "-" << _minimumStay;
00066 return oStr.str();
00067 }
00068
00069 }