AirTSP Logo  1.01.0
C++ Simulated Airline Travel Solution Provider Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SegmentStruct.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 #include <sstream>
7 // StdAir
8 #include <stdair/bom/SegmentDate.hpp>
9 // AirTSP
11 
12 namespace AIRTSP {
13 
14  // //////////////////////////////////////////////////////////////////////
15  const std::string SegmentStruct::describe() const {
16  std::ostringstream ostr;
17  ostr << " " << _boardingPoint << " / "
18  << boost::posix_time::to_simple_string(_boardingTime)
19  << " -- " << _offPoint << " / "
20  << boost::posix_time::to_simple_string(_offTime)
21  << " --> "
22  << boost::posix_time::to_simple_string(_elapsed)
23  << std::endl;
24  for (SegmentCabinStructList_T::const_iterator itCabin =
25  _cabinList.begin(); itCabin != _cabinList.end(); itCabin++) {
26  const SegmentCabinStruct& lCabin = *itCabin;
27  ostr << lCabin.describe();
28  }
29  ostr << std::endl;
30 
31  return ostr.str();
32  }
33 
34  // //////////////////////////////////////////////////////////////////////
35  void SegmentStruct::fill (stdair::SegmentDate& ioSegmentDate) const {
36  // Note that some parameters (boarding date, boarding time, off
37  // date, off time, elapsed time) are set by
38  // SegmentDate::fillFromRouting() when the routing (with legs) is
39  // built. So, it is useless to set those parameters here.
40 
41  // At that time, there are no other parameters.
42  }
43 
44 }