8 #include <stdair/basic/BasConst_General.hpp>
9 #include <stdair/service/Logger.hpp>
18 : _flightDate (stdair::DEFAULT_DATE),
21 _itSeconds (0), _legAlreadyDefined (false) {
31 return boost::posix_time::hours (
_itHours)
38 std::ostringstream ostr;
44 ostr <<
")" << std::endl;
46 for (LegStructList_T::const_iterator itLeg =
_legList.begin();
52 for (SegmentStructList_T::const_iterator itSegment =
_segmentList.begin();
68 AirportList_T::const_iterator itAirport =
_airportList.find (iAirport);
71 const bool insertSuccessful =
_airportList.insert (iAirport).second;
73 if (insertSuccessful ==
false) {
96 for (AirportOrderedList_T::const_iterator itAirport_i =
99 for (AirportOrderedList_T::const_iterator itAirport_j = itAirport_i + 1;
120 SegmentStructList_T::iterator itSegment =
_segmentList.begin();
124 const stdair::AirportCode_T& lBoardingPoint = iSegment.
_boardingPoint;
125 const stdair::AirportCode_T& lOffPoint = iSegment.
_offPoint;
136 STDAIR_LOG_ERROR (
"Within the inventory input file, there is a "
137 <<
"flight for which the airports of segments "
138 <<
"and those of the legs do not correspond.");
140 "there is a flight for which the "
141 "airports of segments and those of "
142 "the legs do not correspond.");
157 for (SegmentStructList_T::iterator itSegment =
_segmentList.begin();
172 SegmentStructList_T::iterator itSegment =
_segmentList.begin();
176 const stdair::AirportCode_T& lBoardingPoint = iSegment.
_boardingPoint;
177 const stdair::AirportCode_T& lOffPoint = iSegment.
_offPoint;
188 STDAIR_LOG_ERROR (
"Within the schedule input file, there is a flight "
189 <<
"for which the airports of segments and "
190 <<
"those of the legs do not correspond.");
192 "there is a flight for which the "
193 "airports of segments and those of "
194 "the legs do not correspond.");
202 SegmentCabinStructList_T::iterator itCabin = lSegment.
_cabinList.begin();
203 for ( ; itCabin != lSegment._cabinList.end(); ++itCabin) {
206 const stdair::CabinCode_T& lCabinCode = lCabin.
_cabinCode;
215 if (itCabin == lSegment._cabinList.end()) {
216 STDAIR_LOG_ERROR (
"Within the schedule input file, there is a flight "
217 <<
"for which the cabin code does not exist.");
219 "there is a flight for which the "
220 "cabin code does not exist.");
224 assert (itCabin != lSegment._cabinList.end());
236 for (SegmentStructList_T::iterator itSegment =
_segmentList.begin();
241 SegmentCabinStructList_T::iterator itCabin = lSegment.
_cabinList.begin();
242 for ( ; itCabin != lSegment.
_cabinList.end(); ++itCabin) {
245 const stdair::CabinCode_T& lCabinCode = lCabin.
_cabinCode;
255 STDAIR_LOG_ERROR (
"Within the schedule input file, there is a flight"
256 <<
" for which the cabin code does not exist.");
258 "there is a flight for which the "
259 "cabin code does not exist.");
263 assert (itCabin != lSegment.
_cabinList.end());