1.00.15
C++ Simulated Airline Inventory Management System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
SegmentStruct.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
// STDAIR
7
#include <stdair/bom/SegmentDate.hpp>
8
// AIRINV
9
#include <
airinv/bom/SegmentStruct.hpp
>
10
11
namespace
AIRINV
{
12
13
// //////////////////////////////////////////////////////////////////////
14
const
std::string
SegmentStruct::describe
()
const
{
15
std::ostringstream ostr;
16
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
25
for
(SegmentCabinStructList_T::const_iterator itCabin =
26
_cabinList
.begin(); itCabin !=
_cabinList
.end(); itCabin++) {
27
const
SegmentCabinStruct
& lCabin = *itCabin;
28
ostr << lCabin.
describe
();
29
}
30
ostr << std::endl;
31
32
return
ostr.str();
33
}
34
35
// //////////////////////////////////////////////////////////////////////
36
void
SegmentStruct::fill
(stdair::SegmentDate& ioSegmentDate)
const
{
37
// Set the Boarding Date
38
ioSegmentDate.setBoardingDate (
_offDate
);
39
// Set the Boarding Time
40
ioSegmentDate.setBoardingTime (
_boardingTime
);
41
// Set the Off Date
42
ioSegmentDate.setOffDate (
_offDate
);
43
// Set the Off Time
44
ioSegmentDate.setOffTime (
_offTime
);
45
// Set the Elapsed Time
46
ioSegmentDate.setElapsedTime (
_elapsed
);
47
}
48
49
}
SegmentStruct.hpp
AIRINV
Definition
AIRINV_Master_Service.hpp:38
AIRINV::SegmentCabinStruct
Utility Structure for the parsing of SegmentCabin details.
Definition
SegmentCabinStruct.hpp:26
AIRINV::SegmentCabinStruct::describe
const std::string describe() const
Definition
SegmentCabinStruct.cpp:15
AIRINV::SegmentStruct::_offTime
stdair::Duration_T _offTime
Definition
SegmentStruct.hpp:30
AIRINV::SegmentStruct::_offPoint
stdair::AirportCode_T _offPoint
Definition
SegmentStruct.hpp:26
AIRINV::SegmentStruct::_boardingTime
stdair::Duration_T _boardingTime
Definition
SegmentStruct.hpp:28
AIRINV::SegmentStruct::_elapsed
stdair::Duration_T _elapsed
Definition
SegmentStruct.hpp:31
AIRINV::SegmentStruct::_cabinList
SegmentCabinStructList_T _cabinList
Definition
SegmentStruct.hpp:32
AIRINV::SegmentStruct::fill
void fill(stdair::SegmentDate &) const
Definition
SegmentStruct.cpp:36
AIRINV::SegmentStruct::_boardingPoint
stdair::AirportCode_T _boardingPoint
Definition
SegmentStruct.hpp:25
AIRINV::SegmentStruct::describe
const std::string describe() const
Definition
SegmentStruct.cpp:14
AIRINV::SegmentStruct::_offDate
stdair::Date_T _offDate
Definition
SegmentStruct.hpp:29
Generated on
for AirInv by
1.17.0