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;
133 std::ostringstream oStr;
134 oStr <<
"Within the schedule input file, there is a flight, for which "
135 <<
"the airports of segments and those of the legs "
136 <<
"do not correspond";
137 STDAIR_LOG_ERROR (oStr.str());
152 for (SegmentStructList_T::iterator itSegment =
_segmentList.begin();
167 SegmentStructList_T::iterator itSegment =
_segmentList.begin();
171 const stdair::AirportCode_T& lBoardingPoint = iSegment.
_boardingPoint;
172 const stdair::AirportCode_T& lOffPoint = iSegment.
_offPoint;
185 std::ostringstream oStr;
186 oStr <<
"Within the schedule input file, there is a flight, for which "
187 <<
"the airports of segments and those of the legs "
188 <<
"do not correspond";
189 STDAIR_LOG_ERROR (oStr.str());
198 SegmentCabinStructList_T::iterator itCabin = lSegment.
_cabinList.begin();
199 for ( ; itCabin != lSegment._cabinList.end(); ++itCabin) {
202 const stdair::CabinCode_T& lCabinCode = lCabin.
_cabinCode;
213 if (itCabin == lSegment._cabinList.end()) {
214 std::ostringstream oStr;
215 oStr <<
"Within the schedule input file, there is a flight "
216 <<
"for which the cabin code does not exist.";
217 STDAIR_LOG_ERROR (oStr.str());
222 assert (itCabin != lSegment._cabinList.end());
234 for (SegmentStructList_T::iterator itSegment =
_segmentList.begin();
239 SegmentCabinStructList_T::iterator itCabin = lSegment.
_cabinList.begin();
240 for ( ; itCabin != lSegment.
_cabinList.end(); ++itCabin) {
243 const stdair::CabinCode_T& lCabinCode = lCabin.
_cabinCode;
255 std::ostringstream oStr;
256 oStr <<
"Within the schedule input file, there is a flight "
257 <<
"for which the cabin code does not exist.";
258 STDAIR_LOG_ERROR (oStr.str());
263 assert (itCabin != lSegment.
_cabinList.end());