7 #include <stdair/basic/BasConst_General.hpp>
8 #include <stdair/bom/SegmentPeriod.hpp>
18 for (SegmentCabinStructList_T::const_iterator itCabin =
20 itCabin != iSegmentStruct.
_cabinList.end(); ++itCabin) {
23 addCabinBookingClassList (lSegmentCabinStruct.
_cabinCode,
32 const stdair::AirportCode_T& lBoardingPoint =
33 ioSegmentPeriod.getBoardingPoint ();
34 const stdair::AirportCode_T& lOffPoint = ioSegmentPeriod.getOffPoint();
35 stdair::Duration_T lElapsedTime;
38 LegStructList_T::const_iterator itLeg = iLegList.begin ();
39 while (itLeg != iLegList.end()) {
47 assert (itLeg != iLegList.end());
49 stdair::AirportCode_T lCurrentOffPoint = lFirstLeg.
_offPoint;
50 stdair::Duration_T lCurrentOffTime = lFirstLeg._offTime;
53 lElapsedTime += lFirstLeg._elapsed;
56 while (lCurrentOffPoint != lOffPoint) {
58 assert (itLeg != iLegList.end());
61 assert (lCurrentOffPoint == lCurrentLeg._boardingPoint);
64 const stdair::Duration_T lStopOverTime =
65 lCurrentLeg._boardingTime - lCurrentOffTime;
66 lElapsedTime += lStopOverTime;
69 lElapsedTime += lCurrentLeg._elapsed;
71 lCurrentOffTime = lCurrentLeg._offTime;
72 lCurrentOffPoint = lCurrentLeg._offPoint;
77 ioSegmentPeriod.setBoardingTime (lFirstLeg._boardingTime);
78 ioSegmentPeriod.setOffTime (lLastLeg.
_offTime);
79 ioSegmentPeriod.setBoardingDateOffset (lFirstLeg._boardingDateOffset);
81 ioSegmentPeriod.setElapsedTime (lElapsedTime);