Go to the documentation of this file.00001
00002
00003
00004
00005 #include <cassert>
00006
00007 #include <stdair/bom/SegmentDate.hpp>
00008
00009 #include <airinv/bom/SegmentStruct.hpp>
00010
00011 namespace AIRINV {
00012
00013
00014 const std::string SegmentStruct::describe() const {
00015 std::ostringstream ostr;
00016
00017 ostr << " " << _boardingPoint << " / "
00018 << boost::posix_time::to_simple_string(_boardingTime)
00019 << " -- " << _offPoint << " / "
00020 << boost::posix_time::to_simple_string(_offTime)
00021 << " --> "
00022 << boost::posix_time::to_simple_string(_elapsed)
00023 << std::endl;
00024
00025 for (SegmentCabinStructList_T::const_iterator itCabin =
00026 _cabinList.begin(); itCabin != _cabinList.end(); itCabin++) {
00027 const SegmentCabinStruct& lCabin = *itCabin;
00028 ostr << lCabin.describe();
00029 }
00030 ostr << std::endl;
00031
00032 return ostr.str();
00033 }
00034
00035
00036 void SegmentStruct::fill (stdair::SegmentDate& ioSegmentDate) const {
00037
00038 ioSegmentDate.setBoardingDate (_offDate);
00039
00040 ioSegmentDate.setBoardingTime (_boardingTime);
00041
00042 ioSegmentDate.setOffDate (_offDate);
00043
00044 ioSegmentDate.setOffTime (_offTime);
00045
00046 ioSegmentDate.setElapsedTime (_elapsed);
00047 }
00048
00049 }