1.00.0
C++ Standard Airline IT Object Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
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
template
<
typename
BOM>
friend
class
FacCloneBom
;
18
friend
class
FacBomManager
;
19
20
public
:
21
// Type definitions.
23
typedef
SegmentPeriodKey
Key_T
;
24
25
public
:
26
// /////////// Getters /////////////
28
const
Key_T
&
getKey
()
const
{
return
_key
; }
29
31
BomAbstract
*
const
getParent
()
const
{
return
_parent
; }
32
34
const
AirportCode_T
&
getBoardingPoint
()
const
{
35
return
_key
.
getBoardingPoint
();
36
}
37
39
const
AirportCode_T
&
getOffPoint
()
const
{
return
_key
.
getOffPoint
(); }
40
42
const
Duration_T
&
getBoardingTime
()
const
{
return
_boardingTime
; }
43
45
const
Duration_T
&
getOffTime
()
const
{
return
_offTime
; }
46
48
const
DateOffset_T
&
getBoardingDateOffset
()
const
{
49
return
_boardingDateOffset
;
50
}
51
53
const
DateOffset_T
&
getOffDateOffset
()
const
{
return
_offDateOffset
; }
54
56
const
Duration_T
&
getElapsedTime
()
const
{
return
_elapsedTime
; }
57
59
const
CabinBookingClassMap_T
&
getCabinBookingClassMap
()
const
{
60
return
_cabinBookingClassMap
;
61
}
62
64
const
HolderMap_T
&
getHolderMap
()
const
{
return
_holderMap
; }
65
66
public
:
67
// ///////// Setters //////////
69
void
setBoardingTime
(
const
Duration_T
& iBoardingTime) {
70
_boardingTime
= iBoardingTime;
71
}
72
74
void
setOffTime
(
const
Duration_T
& iOffTime) {
_offTime
= iOffTime; }
75
77
void
setBoardingDateOffset
(
const
DateOffset_T
& iDateOffset) {
78
_boardingDateOffset
= iDateOffset;
79
}
80
82
void
setOffDateOffset
(
const
DateOffset_T
& iDateOffset) {
83
_offDateOffset
= iDateOffset;
84
}
85
87
void
setElapsedTime
(
const
Duration_T
& iElapsedTime) {
88
_elapsedTime
= iElapsedTime;
89
}
90
93
void
addCabinBookingClassList
(
const
CabinCode_T
&,
94
const
ClassList_String_T
&);
95
96
public
:
97
// /////////// Display support methods /////////
100
void
toStream
(std::ostream& ioOut)
const
{ ioOut <<
toString
(); }
101
104
void
fromStream
(std::istream& ioIn) { }
105
107
std::string
toString
()
const
;
108
110
const
std::string
describeKey
()
const
{
return
_key
.
toString
(); }
111
112
protected
:
113
// ////////// Constructors and destructors /////////
117
SegmentPeriod
(
const
Key_T
&);
121
virtual
~SegmentPeriod
();
122
123
private
:
127
SegmentPeriod
();
131
SegmentPeriod
(
const
SegmentPeriod
&);
132
133
protected
:
134
// Attributes
135
Key_T
_key
;
136
BomAbstract
*
_parent
;
137
Duration_T
_boardingTime
;
138
Duration_T
_offTime
;
139
DateOffset_T
_boardingDateOffset
;
140
DateOffset_T
_offDateOffset
;
141
Duration_T
_elapsedTime
;
142
CabinBookingClassMap_T
_cabinBookingClassMap
;
143
HolderMap_T
_holderMap
;
144
};
145
146
}
147
#endif // __STDAIR_BOM_SEGMENTPERIOD_HPP
148
Generated on Sat Dec 22 2012 16:51:54 for StdAir by
1.8.1.1