StdAir Logo  1.00.8
C++ Standard Airline IT Object Library
SegmentPeriod.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 // STDAIR
9 
10 namespace stdair {
11 
12  // ////////////////////////////////////////////////////////////////////
13  SegmentPeriod::SegmentPeriod (const Key_T& iKey)
14  : _key (iKey), _parent (NULL), _boardingDateOffset (0), _offDateOffset (0) {
15  }
16 
17  // ////////////////////////////////////////////////////////////////////
18  SegmentPeriod::SegmentPeriod (const SegmentPeriod& iSegmentPeriod)
19  : _key (iSegmentPeriod.getKey()),
20  _parent (NULL),
21  _boardingTime (iSegmentPeriod._boardingTime),
22  _offTime (iSegmentPeriod._offTime),
23  _boardingDateOffset (iSegmentPeriod._boardingDateOffset),
24  _offDateOffset (iSegmentPeriod._offDateOffset),
25  _elapsedTime (iSegmentPeriod._elapsedTime) {
26  }
27 
28  // ////////////////////////////////////////////////////////////////////
30  }
31 
32  // ////////////////////////////////////////////////////////////////////
33  std::string SegmentPeriod::toString() const {
34  std::ostringstream oStr;
35  oStr << describeKey();
36  return oStr.str();
37  }
38 
39  // ////////////////////////////////////////////////////////////////////
40  void SegmentPeriod::
42  const ClassList_String_T& iClassCodeList) {
43  const bool insert = _cabinBookingClassMap.
44  insert (CabinBookingClassMap_T::value_type (iCabinCode,
45  iClassCodeList)).second;
46  assert (insert == true);
47  }
48 
49 }
stdair::SegmentPeriodKey
Definition: SegmentPeriodKey.hpp:14
stdair::SegmentPeriod::addCabinBookingClassList
void addCabinBookingClassList(const CabinCode_T &, const ClassList_String_T &)
Definition: SegmentPeriod.cpp:41
stdair::ClassList_String_T
std::string ClassList_String_T
Definition: stdair_basic_types.hpp:114
stdair::SegmentPeriod::describeKey
const std::string describeKey() const
Definition: SegmentPeriod.hpp:110
stdair::SegmentPeriod::_cabinBookingClassMap
CabinBookingClassMap_T _cabinBookingClassMap
Definition: SegmentPeriod.hpp:142
stdair
Handle on the StdAir library context.
Definition: BasChronometer.cpp:9
stdair::SegmentPeriod::~SegmentPeriod
virtual ~SegmentPeriod()
Definition: SegmentPeriod.cpp:29
BasConst_BookingClass.hpp
SegmentPeriod.hpp
stdair::CabinCode_T
std::string CabinCode_T
Definition: stdair_basic_types.hpp:41
stdair::SegmentPeriod
Definition: SegmentPeriod.hpp:15
stdair::SegmentPeriod::toString
std::string toString() const
Definition: SegmentPeriod.cpp:33