1.01.6
C++ Simulated Airline Travel Solution Provider (TSP) Library
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
10
#include <
airtsp/bom/SegmentStruct.hpp
>
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
}
AIRTSP::SegmentStruct::_boardingPoint
stdair::AirportCode_T _boardingPoint
Definition:
SegmentStruct.hpp:26
AIRTSP::SegmentCabinStruct
Definition:
SegmentCabinStruct.hpp:24
AIRTSP::SegmentStruct::_cabinList
SegmentCabinStructList_T _cabinList
Definition:
SegmentStruct.hpp:33
AIRTSP::SegmentCabinStruct::describe
const std::string describe() const
Definition:
SegmentCabinStruct.cpp:15
AIRTSP::SegmentStruct::_offPoint
stdair::AirportCode_T _offPoint
Definition:
SegmentStruct.hpp:29
SegmentStruct.hpp
AIRTSP
Definition:
AIRTSP_Service.hpp:23
AIRTSP::SegmentStruct::_elapsed
stdair::Duration_T _elapsed
Definition:
SegmentStruct.hpp:32
AIRTSP::SegmentStruct::_boardingTime
stdair::Duration_T _boardingTime
Definition:
SegmentStruct.hpp:28
AIRTSP::SegmentStruct::_offTime
stdair::Duration_T _offTime
Definition:
SegmentStruct.hpp:31
AIRTSP::SegmentStruct::fill
void fill(stdair::SegmentDate &) const
Definition:
SegmentStruct.cpp:35
AIRTSP::SegmentStruct::describe
const std::string describe() const
Definition:
SegmentStruct.cpp:15
Generated on Thu Feb 6 2020 00:00:00 for AirTSP by
1.8.17