1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
SegmentPeriod.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
// STDAIR
7
#include <
stdair/basic/BasConst_BookingClass.hpp
>
8
#include <
stdair/bom/SegmentPeriod.hpp
>
9
10
namespace
stdair
{
11
12
// ////////////////////////////////////////////////////////////////////
13
SegmentPeriod::SegmentPeriod
(
const
Key_T
& iKey)
14
:
_key
(iKey),
_parent
(NULL),
_boardingDateOffset
(0),
_offDateOffset
(0) {
15
}
16
17
// ////////////////////////////////////////////////////////////////////
18
SegmentPeriod::SegmentPeriod
(
const
SegmentPeriod
& iSegmentPeriod)
19
: _key (iSegmentPeriod.getKey()),
20
_parent (NULL),
21
_boardingTime (iSegmentPeriod._boardingTime),
22
_offTime (iSegmentPeriod._offTime),
23
_boardingDateOffset (iSegmentPeriod._boardingDateOffset),
24
_offDateOffset (iSegmentPeriod._offDateOffset),
25
_elapsedTime (iSegmentPeriod._elapsedTime) {
26
}
27
28
// ////////////////////////////////////////////////////////////////////
29
SegmentPeriod::~SegmentPeriod
() {
30
}
31
32
// ////////////////////////////////////////////////////////////////////
33
std::string
SegmentPeriod::toString
()
const
{
34
std::ostringstream oStr;
35
oStr <<
describeKey
();
36
return
oStr.str();
37
}
38
39
// ////////////////////////////////////////////////////////////////////
40
void
SegmentPeriod::
41
addCabinBookingClassList
(
const
CabinCode_T
& iCabinCode,
42
const
ClassList_String_T
& iClassCodeList) {
43
const
bool
insert =
_cabinBookingClassMap
.
44
insert (CabinBookingClassMap_T::value_type (iCabinCode,
45
iClassCodeList)).second;
46
assert (insert ==
true
);
47
}
48
49
}
BasConst_BookingClass.hpp
SegmentPeriod.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::ClassList_String_T
std::string ClassList_String_T
Definition
stdair_basic_types.hpp:114
stdair::CabinCode_T
std::string CabinCode_T
Definition
stdair_basic_types.hpp:41
stdair::SegmentPeriod
Definition
SegmentPeriod.hpp:15
stdair::SegmentPeriod::_offDateOffset
DateOffset_T _offDateOffset
Definition
SegmentPeriod.hpp:140
stdair::SegmentPeriod::~SegmentPeriod
virtual ~SegmentPeriod()
Definition
SegmentPeriod.cpp:29
stdair::SegmentPeriod::_parent
BomAbstract * _parent
Definition
SegmentPeriod.hpp:136
stdair::SegmentPeriod::_key
Key_T _key
Definition
SegmentPeriod.hpp:135
stdair::SegmentPeriod::toString
std::string toString() const
Definition
SegmentPeriod.cpp:33
stdair::SegmentPeriod::describeKey
const std::string describeKey() const
Definition
SegmentPeriod.hpp:110
stdair::SegmentPeriod::_boardingDateOffset
DateOffset_T _boardingDateOffset
Definition
SegmentPeriod.hpp:139
stdair::SegmentPeriod::SegmentPeriod
SegmentPeriod(const Key_T &)
Definition
SegmentPeriod.cpp:13
stdair::SegmentPeriod::Key_T
SegmentPeriodKey Key_T
Definition
SegmentPeriod.hpp:23
stdair::SegmentPeriod::_cabinBookingClassMap
CabinBookingClassMap_T _cabinBookingClassMap
Definition
SegmentPeriod.hpp:142
stdair::SegmentPeriod::addCabinBookingClassList
void addCabinBookingClassList(const CabinCode_T &, const ClassList_String_T &)
Definition
SegmentPeriod.cpp:41
Generated for StdAir by
1.17.0