$treeview $search $mathjax
00001 // ////////////////////////////////////////////////////////////////////// 00002 // Import section 00003 // ////////////////////////////////////////////////////////////////////// 00004 // STL 00005 #include <cassert> 00006 // STDAIR 00007 #include <stdair/basic/BasConst_BookingClass.hpp> 00008 #include <stdair/bom/SegmentPeriod.hpp> 00009 00010 namespace stdair { 00011 00012 // //////////////////////////////////////////////////////////////////// 00013 SegmentPeriod::SegmentPeriod (const Key_T& iKey) 00014 : _key (iKey), _parent (NULL), _boardingDateOffset (0), _offDateOffset (0) { 00015 } 00016 00017 // //////////////////////////////////////////////////////////////////// 00018 SegmentPeriod::SegmentPeriod (const SegmentPeriod& iSegmentPeriod) 00019 : _key (iSegmentPeriod.getKey()), 00020 _parent (NULL), 00021 _boardingTime (iSegmentPeriod._boardingTime), 00022 _offTime (iSegmentPeriod._offTime), 00023 _boardingDateOffset (iSegmentPeriod._boardingDateOffset), 00024 _offDateOffset (iSegmentPeriod._offDateOffset), 00025 _elapsedTime (iSegmentPeriod._elapsedTime) { 00026 } 00027 00028 // //////////////////////////////////////////////////////////////////// 00029 SegmentPeriod::~SegmentPeriod () { 00030 } 00031 00032 // //////////////////////////////////////////////////////////////////// 00033 std::string SegmentPeriod::toString() const { 00034 std::ostringstream oStr; 00035 oStr << describeKey(); 00036 return oStr.str(); 00037 } 00038 00039 // //////////////////////////////////////////////////////////////////// 00040 void SegmentPeriod:: 00041 addCabinBookingClassList (const CabinCode_T& iCabinCode, 00042 const ClassList_String_T& iClassCodeList) { 00043 const bool insert = _cabinBookingClassMap. 00044 insert (CabinBookingClassMap_T::value_type (iCabinCode, 00045 iClassCodeList)).second; 00046 assert (insert == true); 00047 } 00048 00049 }