$treeview $search $mathjax
00001 // ////////////////////////////////////////////////////////////////////// 00002 // Import section 00003 // ////////////////////////////////////////////////////////////////////// 00004 // STL 00005 #include <ostream> 00006 #include <sstream> 00007 // StdAir 00008 #include <stdair/basic/BasConst_Request.hpp> 00009 #include <stdair/bom/YieldFeaturesKey.hpp> 00010 00011 namespace stdair { 00012 00013 // //////////////////////////////////////////////////////////////////// 00014 YieldFeaturesKey::YieldFeaturesKey() 00015 : _tripType (TRIP_TYPE_ONE_WAY), 00016 _cabinCode (DEFAULT_PREFERRED_CABIN) { 00017 assert (false); 00018 } 00019 00020 // //////////////////////////////////////////////////////////////////// 00021 YieldFeaturesKey::YieldFeaturesKey (const stdair::TripType_T& iTripType, 00022 const stdair::CabinCode_T& iCabin) 00023 : _tripType (iTripType), _cabinCode (iCabin) { 00024 } 00025 00026 // //////////////////////////////////////////////////////////////////// 00027 YieldFeaturesKey::YieldFeaturesKey (const YieldFeaturesKey& iKey) 00028 : _tripType (iKey.getTripType()), _cabinCode (iKey.getCabinCode()) { 00029 } 00030 00031 // //////////////////////////////////////////////////////////////////// 00032 YieldFeaturesKey::~YieldFeaturesKey () { 00033 } 00034 00035 // //////////////////////////////////////////////////////////////////// 00036 void YieldFeaturesKey::toStream (std::ostream& ioOut) const { 00037 ioOut << "YieldFeaturesKey: " << toString() << std::endl; 00038 } 00039 00040 // //////////////////////////////////////////////////////////////////// 00041 void YieldFeaturesKey::fromStream (std::istream& ioIn) { 00042 } 00043 00044 // //////////////////////////////////////////////////////////////////// 00045 const std::string YieldFeaturesKey::toString() const { 00046 std::ostringstream oStr; 00047 oStr << _tripType << " -- " << _cabinCode; 00048 return oStr.str(); 00049 } 00050 00051 }