8 #include <stdair/basic/BasConst_Period_BOM.hpp>
9 #include <stdair/service/Logger.hpp>
18 : _dateRange (stdair::BOOST_DEFAULT_DATE_PERIOD),
19 _dow (stdair::DEFAULT_DOW_STRING),
20 _legAlreadyDefined (false), _itSeconds (0) {
30 return boost::posix_time::hours (
_itHours)
37 std::ostringstream ostr;
39 <<
" - " <<
_dow << std::endl;
41 for (LegStructList_T::const_iterator itLeg =
_legList.begin();
47 for (SegmentStructList_T::const_iterator itSegment =
_segmentList.begin();
63 AirportList_T::const_iterator itAirport =
_airportList.find (iAirport);
66 const bool insertSuccessful =
_airportList.insert (iAirport).second;
68 if (insertSuccessful ==
false) {
91 for (AirportOrderedList_T::const_iterator itAirport_i =
94 for (AirportOrderedList_T::const_iterator itAirport_j = itAirport_i + 1;
115 SegmentStructList_T::iterator itSegment =
_segmentList.begin();
119 const stdair::AirportCode_T& lBoardingPoint = iSegment.
_boardingPoint;
120 const stdair::AirportCode_T& lOffPoint = iSegment.
_offPoint;
131 STDAIR_LOG_ERROR (
"Within the schedule input file, there is a "
132 <<
"flight for which the airports of segments "
133 <<
"and those of the legs do not correspond.");
135 "there is a flight for which the "
136 "airports of segments and those of "
137 "the legs do not correspond.");
151 for (SegmentStructList_T::iterator itSegment =
_segmentList.begin();
166 SegmentStructList_T::iterator itSegment =
_segmentList.begin();
170 const stdair::AirportCode_T& lBoardingPoint = iSegment.
_boardingPoint;
171 const stdair::AirportCode_T& lOffPoint = iSegment.
_offPoint;
182 STDAIR_LOG_ERROR (
"Within the schedule input file, there is a flight "
183 <<
"for which the airports of segments and "
184 <<
"those of the legs do not correspond.");
186 "there is a flight for which the "
187 "airports of segments and those of "
188 "the legs do not correspond.");
196 SegmentCabinStructList_T::iterator itCabin = lSegment.
_cabinList.begin();
197 for ( ; itCabin != lSegment._cabinList.end(); ++itCabin) {
200 const stdair::CabinCode_T& lCabinCode = lCabin.
_cabinCode;
209 if (itCabin == lSegment._cabinList.end()) {
210 STDAIR_LOG_ERROR (
"Within the schedule input file, there is a flight "
211 <<
"for which the cabin code does not exist.");
213 "there is a flight for which the "
214 "cabin code does not exist.");
218 assert (itCabin != lSegment._cabinList.end());
230 for (SegmentStructList_T::iterator itSegment =
_segmentList.begin();
235 SegmentCabinStructList_T::iterator itCabin = lSegment.
_cabinList.begin();
236 for ( ; itCabin != lSegment.
_cabinList.end(); ++itCabin) {
239 const stdair::CabinCode_T& lCabinCode = lCabin.
_cabinCode;
249 STDAIR_LOG_ERROR (
"Within the schedule input file, there is a flight"
250 <<
" for which the cabin code does not exist.");
252 "there is a flight for which the "
253 "cabin code does not exist.");
257 assert (itCabin != lSegment.
_cabinList.end());