StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SegmentPeriod.cpp
Go to the documentation of this file.
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 () {
00019   }
00020   
00021   // ////////////////////////////////////////////////////////////////////
00022   std::string SegmentPeriod::toString() const {
00023     std::ostringstream oStr;
00024     oStr << describeKey();
00025     return oStr.str();
00026   }
00027 
00028   // ////////////////////////////////////////////////////////////////////
00029   void SegmentPeriod::
00030   addCabinBookingClassList (const CabinCode_T& iCabinCode,
00031                             const ClassList_String_T& iClassCodeList) {
00032     const bool insert = _cabinBookingClassMap.
00033       insert (CabinBookingClassMap_T::value_type (iCabinCode, 
00034                                                   iClassCodeList)).second;
00035     assert (insert == true);
00036   }
00037 
00038 }