0.45.1
C++ Standard Airline IT Object Library
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SegmentPeriod.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_SEGMENTPERIOD_HPP
2
#define __STDAIR_BOM_SEGMENTPERIOD_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STDAIR
8
#include <
stdair/bom/BomAbstract.hpp
>
9
#include <
stdair/bom/SegmentPeriodKey.hpp
>
10
#include <
stdair/bom/SegmentPeriodTypes.hpp
>
11
12
namespace
stdair {
13
15
class
SegmentPeriod
:
public
BomAbstract
{
16
template
<
typename
BOM>
friend
class
FacBom
;
17
friend
class
FacBomManager
;
18
19
public
:
20
// Type definitions.
22
typedef
SegmentPeriodKey
Key_T
;
23
24
public
:
25
// /////////// Getters /////////////
27
const
Key_T
&
getKey
()
const
{
return
_key
; }
28
30
BomAbstract
*
const
getParent
()
const
{
return
_parent
; }
31
33
const
AirportCode_T
&
getBoardingPoint
()
const
{
34
return
_key
.
getBoardingPoint
();
35
}
36
38
const
AirportCode_T
&
getOffPoint
()
const
{
return
_key
.
getOffPoint
(); }
39
41
const
Duration_T
&
getBoardingTime
()
const
{
return
_boardingTime
; }
42
44
const
Duration_T
&
getOffTime
()
const
{
return
_offTime
; }
45
47
const
DateOffset_T
&
getBoardingDateOffset
()
const
{
48
return
_boardingDateOffset
;
49
}
50
52
const
DateOffset_T
&
getOffDateOffset
()
const
{
return
_offDateOffset
; }
53
55
const
Duration_T
&
getElapsedTime
()
const
{
return
_elapsedTime
; }
56
58
const
CabinBookingClassMap_T
&
getCabinBookingClassMap
()
const
{
59
return
_cabinBookingClassMap
;
60
}
61
63
const
HolderMap_T
&
getHolderMap
()
const
{
return
_holderMap
; }
64
65
public
:
66
// ///////// Setters //////////
68
void
setBoardingTime
(
const
Duration_T
& iBoardingTime) {
69
_boardingTime
= iBoardingTime;
70
}
71
73
void
setOffTime
(
const
Duration_T
& iOffTime) {
_offTime
= iOffTime; }
74
76
void
setBoardingDateOffset
(
const
DateOffset_T
& iDateOffset) {
77
_boardingDateOffset
= iDateOffset;
78
}
79
81
void
setOffDateOffset
(
const
DateOffset_T
& iDateOffset) {
82
_offDateOffset
= iDateOffset;
83
}
84
86
void
setElapsedTime
(
const
Duration_T
& iElapsedTime) {
87
_elapsedTime
= iElapsedTime;
88
}
89
92
void
addCabinBookingClassList
(
const
CabinCode_T
&,
93
const
ClassList_String_T
&);
94
95
public
:
96
// /////////// Display support methods /////////
99
void
toStream
(std::ostream& ioOut)
const
{ ioOut <<
toString
(); }
100
103
void
fromStream
(std::istream& ioIn) { }
104
106
std::string
toString
()
const
;
107
109
const
std::string
describeKey
()
const
{
return
_key
.
toString
(); }
110
111
protected
:
113
SegmentPeriod
(
const
Key_T
&);
114
SegmentPeriod
(
const
SegmentPeriod
&);
116
~SegmentPeriod
();
117
118
protected
:
119
// Attributes
120
Key_T
_key
;
121
BomAbstract
*
_parent
;
122
Duration_T
_boardingTime
;
123
Duration_T
_offTime
;
124
DateOffset_T
_boardingDateOffset
;
125
DateOffset_T
_offDateOffset
;
126
Duration_T
_elapsedTime
;
127
CabinBookingClassMap_T
_cabinBookingClassMap
;
128
HolderMap_T
_holderMap
;
129
};
130
131
}
132
#endif // __STDAIR_BOM_SEGMENTPERIOD_HPP
133
Generated on Mon Aug 27 2012 21:34:04 for StdAir by
1.8.1.2