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
LegDate.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_LEGDATE_HPP
2
#define __STDAIR_BOM_LEGDATE_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
// StdAir
11
#include <
stdair/stdair_inventory_types.hpp
>
12
#include <
stdair/bom/BomAbstract.hpp
>
13
#include <
stdair/bom/LegDateKey.hpp
>
14
#include <
stdair/bom/LegDateTypes.hpp
>
15
16
namespace
stdair {
17
19
struct
LegCabinKey;
20
class
LegCabin;
21
25
class
LegDate
:
public
BomAbstract
{
26
template
<
typename
BOM>
friend
class
FacBom
;
27
friend
class
FacBomManager
;
28
29
public
:
30
// ////////// Type definitions ////////////
32
typedef
LegDateKey
Key_T
;
33
34
35
public
:
36
// /////////// Getters /////////////
38
const
Key_T
&
getKey
()
const
{
39
return
_key
;
40
}
41
43
BomAbstract
*
const
getParent
()
const
{
44
return
_parent
;
45
}
46
48
const
AirportCode_T
&
getBoardingPoint
()
const
{
49
return
_key
.
getBoardingPoint
();
50
}
51
59
const
AirlineCode_T
&
getAirlineCode
()
const
;
60
64
const
HolderMap_T
&
getHolderMap
()
const
{
65
return
_holderMap
;
66
}
67
78
LegCabin
*
getLegCabin
(
const
std::string& iLegCabinKeyStr)
const
;
79
90
LegCabin
*
getLegCabin
(
const
LegCabinKey
&)
const
;
91
93
const
AirportCode_T
&
getOffPoint
()
const
{
94
return
_offPoint
;
95
}
96
98
const
Date_T
&
getBoardingDate
()
const
{
99
return
_boardingDate
;
100
}
101
103
const
Duration_T
&
getBoardingTime
()
const
{
104
return
_boardingTime
;
105
}
106
108
const
Date_T
&
getOffDate
()
const
{
109
return
_offDate
;
110
}
111
113
const
Duration_T
&
getOffTime
()
const
{
114
return
_offTime
;
115
}
116
118
const
Duration_T
&
getElapsedTime
()
const
{
119
return
_elapsedTime
;
120
}
121
123
const
Distance_T
&
getDistance
()
const
{
124
return
_distance
;
125
}
126
128
const
CabinCapacity_T
&
getCapacity
()
const
{
129
return
_capacity
;
130
}
131
133
const
DateOffset_T
getDateOffset
()
const
{
134
return
_offDate
-
_boardingDate
;
135
}
136
141
const
Duration_T
getTimeOffset
()
const
;
142
143
144
public
:
145
// ///////// Setters //////////
147
void
setOffPoint
(
const
AirportCode_T
& iOffPoint) {
148
_offPoint
= iOffPoint;
149
}
150
152
void
setBoardingDate
(
const
Date_T
& iBoardingDate) {
153
_boardingDate
= iBoardingDate;
154
}
155
157
void
setBoardingTime
(
const
Duration_T
& iBoardingTime) {
158
_boardingTime
= iBoardingTime;
159
}
160
162
void
setOffDate
(
const
Date_T
& iOffDate) {
163
_offDate
= iOffDate;
164
}
165
167
void
setOffTime
(
const
Duration_T
& iOffTime) {
168
_offTime
= iOffTime;
169
}
170
172
void
setElapsedTime
(
const
Duration_T
&);
173
174
private
:
176
void
updateDistanceFromElapsedTime();
177
178
179
public
:
180
// /////////// Display support methods /////////
183
void
toStream
(std::ostream& ioOut)
const
{
184
ioOut <<
toString
();
185
}
186
189
void
fromStream
(std::istream& ioIn) {
190
}
191
193
std::string
toString
()
const
;
194
196
const
std::string
describeKey
()
const
{
197
return
_key
.
toString
();
198
}
199
200
201
protected
:
202
// ////////// Constructors and destructors /////////
204
LegDate
(
const
Key_T
&);
206
virtual
~LegDate
();
207
208
private
:
210
LegDate
();
212
LegDate
(
const
LegDate
&);
213
214
215
protected
:
216
// ////////// Attributes /////////
218
Key_T
_key
;
219
221
BomAbstract
*
_parent
;
222
224
HolderMap_T
_holderMap
;
225
227
AirportCode_T
_offPoint
;
228
230
Date_T
_boardingDate
;
231
233
Duration_T
_boardingTime
;
234
236
Date_T
_offDate
;
237
239
Duration_T
_offTime
;
240
242
Duration_T
_elapsedTime
;
243
245
Distance_T
_distance
;
246
248
CabinCapacity_T
_capacity
;
249
};
250
251
}
252
#endif // __STDAIR_BOM_LEGDATE_HPP
253
Generated on Thu Aug 16 2012 03:18:48 for StdAir by
1.8.1.2