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
LegCabin.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_LEGCABIN_HPP
2
#define __STDAIR_BOM_LEGCABIN_HPP
3
// //////////////////////////////////////////////////////////////////////
4
// Import section
5
// //////////////////////////////////////////////////////////////////////
6
// STL
7
#include <iosfwd>
8
#include <string>
9
// StdAir
10
#include <
stdair/stdair_inventory_types.hpp
>
11
#include <
stdair/stdair_maths_types.hpp
>
12
#include <
stdair/bom/BomAbstract.hpp
>
13
#include <
stdair/bom/LegCabinKey.hpp
>
14
#include <
stdair/bom/LegCabinTypes.hpp
>
15
#include <
stdair/bom/VirtualClassStruct.hpp
>
16
#include <
stdair/bom/VirtualClassTypes.hpp
>
17
18
namespace
stdair {
19
24
class
LegCabin
:
public
BomAbstract
{
25
template
<
typename
BOM>
friend
class
FacBom
;
26
friend
class
FacBomManager
;
27
28
public
:
29
// ////////// Type definitions ////////////
33
typedef
LegCabinKey
Key_T
;
34
35
public
:
36
// /////////// Getters ////////////
40
const
Key_T
&
getKey
()
const
{
41
return
_key
;
42
}
43
47
BomAbstract
*
const
getParent
()
const
{
48
return
_parent
;
49
}
50
54
const
CabinCode_T
&
getCabinCode
()
const
{
55
return
_key
.
getCabinCode
();
56
}
57
65
const
MapKey_T
getFullerKey
()
const
;
66
70
const
HolderMap_T
&
getHolderMap
()
const
{
71
return
_holderMap
;
72
}
73
75
const
CabinCapacity_T
&
getOfferedCapacity
()
const
{
76
return
_offeredCapacity
;
77
}
78
80
const
CabinCapacity_T
&
getPhysicalCapacity
()
const
{
81
return
_physicalCapacity
;
82
}
83
85
const
NbOfSeats_T
&
getSoldSeat
()
const
{
86
return
_soldSeat
;
87
}
88
90
const
CommittedSpace_T
&
getCommittedSpace
()
const
{
91
return
_committedSpace
;
92
}
93
95
const
Availability_T
&
getAvailabilityPool
()
const
{
96
return
_availabilityPool
;
97
}
98
100
const
Availability_T
&
getAvailability
()
const
{
101
return
_availability
;
102
}
103
105
const
BidPrice_T
&
getCurrentBidPrice
()
const
{
106
return
_currentBidPrice
;
107
}
108
110
const
BidPrice_T
&
getPreviousBidPrice
()
const
{
111
return
_previousBidPrice
;
112
}
113
115
const
BidPriceVector_T
&
getBidPriceVector
()
const
{
116
return
_bidPriceVector
;
117
}
118
120
const
CapacityAdjustment_T
&
getRegradeAdjustment
()
const
{
121
return
_dcsRegrade
;
122
}
123
125
const
AuthorizationLevel_T
&
getAuthorizationLevel
()
const
{
126
return
_au
;
127
}
128
130
const
UPR_T
&
getUPR
()
const
{
131
return
_upr
;
132
}
133
135
const
Availability_T
&
getNetAvailability
()
const
{
136
return
_nav
;
137
}
138
140
const
Availability_T
&
getGrossAvailability
()
const
{
141
return
_gav
;
142
}
143
145
const
OverbookingRate_T
&
getAvgCancellationPercentage
()
const
{
146
return
_acp
;
147
}
148
150
const
NbOfSeats_T
&
getETB
()
const
{
151
return
_etb
;
152
}
153
155
const
NbOfSeats_T
&
getStaffNbOfSeats
()
const
{
156
return
_staffNbOfBookings
;
157
}
158
160
const
NbOfSeats_T
&
getWLNbOfSeats
()
const
{
161
return
_wlNbOfBookings
;
162
}
163
165
const
NbOfSeats_T
&
getGroupNbOfSeats
()
const
{
166
return
_groupNbOfBookings
;
167
}
168
170
VirtualClassList_T
&
getVirtualClassList
() {
171
return
_virtualClassList
;
172
}
173
175
BidPriceVector_T
&
getBidPriceVector
() {
176
return
_bidPriceVector
;
177
}
178
179
181
const
YieldLevelDemandMap_T
getYieldLevelDemandMap
() {
182
return
_yieldLevelDemandMap
;
183
}
184
185
186
public
:
187
// ///////////// Setters ///////////////
189
void
setCapacities
(
const
CabinCapacity_T
& iCapacity);
190
192
void
setSoldSeat
(
const
NbOfSeats_T
& iSoldSeat) {
193
_soldSeat
= iSoldSeat;
194
}
195
197
void
setCommittedSpace
(
const
CommittedSpace_T
& iCommittedSpace) {
198
_committedSpace
= iCommittedSpace;
199
}
200
202
void
setAvailabilityPool
(
const
Availability_T
& iAvailabilityPool) {
203
_availabilityPool
= iAvailabilityPool;
204
}
205
207
void
setAvailability
(
const
Availability_T
& iAvailability) {
208
_availability
= iAvailability;
209
}
210
212
void
setCurrentBidPrice
(
const
BidPrice_T
& iBidPrice) {
213
_currentBidPrice
= iBidPrice;
214
}
215
217
void
setPreviousBidPrice
(
const
BidPrice_T
& iBidPrice) {
218
_previousBidPrice
= iBidPrice;
219
}
220
222
void
updatePreviousBidPrice
() {
223
_previousBidPrice
=
_currentBidPrice
;
224
}
225
227
void
setRegradeAdjustment
(
const
CapacityAdjustment_T
& iRegradeAdjustment) {
228
_dcsRegrade
= iRegradeAdjustment;
229
}
230
232
void
setAuthorizationLevel
(
const
AuthorizationLevel_T
& iAU) {
233
_au
= iAU;
234
}
235
237
void
setUPR
(
const
UPR_T
& iUPR) {
238
_upr
= iUPR;
239
}
240
242
void
setNetAvailability
(
const
Availability_T
& iNAV) {
243
_nav
= iNAV;
244
}
245
247
void
setGrossAvailability
(
const
Availability_T
& iGAV) {
248
_gav
= iGAV;
249
}
250
252
void
setAvgCancellationPercentage
(
const
OverbookingRate_T
& iACP) {
253
_acp
= iACP;
254
}
255
257
void
setETB
(
const
NbOfSeats_T
& iETB) {
258
_etb
= iETB;
259
}
260
262
void
setStaffNbOfSeats
(
const
NbOfSeats_T
& iStaffSeats) {
263
_staffNbOfBookings
= iStaffSeats;
264
}
265
267
void
setWLNbOfSeats
(
const
NbOfSeats_T
& iWLSeats) {
268
_wlNbOfBookings
= iWLSeats;
269
}
270
272
void
setGroupNbOfSeats
(
const
NbOfSeats_T
& iGroupSeats) {
273
_groupNbOfBookings
= iGroupSeats;
274
}
275
277
void
updateCurrentBidPrice
();
278
279
280
public
:
281
// /////////// Display support methods /////////
286
void
toStream
(std::ostream& ioOut)
const
{
287
ioOut <<
toString
();
288
}
289
294
void
fromStream
(std::istream& ioIn) {
295
}
296
300
std::string
toString
()
const
;
301
305
const
std::string
describeKey
()
const
{
306
return
_key
.
toString
();
307
}
308
312
const
std::string
displayVirtualClassList
()
const
;
313
314
315
public
:
316
// /////////// Business methods //////////
320
void
updateFromReservation
(
const
NbOfBookings_T
&);
321
325
void
addVirtualClass
(
const
VirtualClassStruct
& iVC) {
326
_virtualClassList
.push_back (iVC);
327
}
328
332
void
emptyVirtualClassList
() {
333
_virtualClassList
.clear();
334
}
335
339
void
emptyBidPriceVector
() {
340
_bidPriceVector
.clear();
341
}
342
346
void
addDemandInformation
(
const
YieldValue_T
&,
const
MeanValue_T
&,
347
const
StdDevValue_T
&);
348
352
void
emptyYieldLevelDemandMap
() {
353
_yieldLevelDemandMap
.clear();
354
}
355
356
357
protected
:
358
// ////////// Constructors and destructors /////////
362
LegCabin
(
const
Key_T
&);
366
~LegCabin
();
367
368
private
:
372
LegCabin
();
376
LegCabin
(
const
LegCabin
&);
377
378
379
380
protected
:
381
// ////////// Attributes /////////
385
Key_T
_key
;
386
390
BomAbstract
*
_parent
;
391
395
HolderMap_T
_holderMap
;
396
398
CabinCapacity_T
_offeredCapacity
;
399
401
CabinCapacity_T
_physicalCapacity
;
402
404
NbOfSeats_T
_soldSeat
;
405
406
/* Committed space. */
407
CommittedSpace_T
_committedSpace
;
408
410
Availability_T
_availabilityPool
;
411
413
Availability_T
_availability
;
414
416
BidPrice_T
_currentBidPrice
;
417
419
BidPrice_T
_previousBidPrice
;
420
422
BidPriceVector_T
_bidPriceVector
;
423
425
VirtualClassList_T
_virtualClassList
;
426
428
YieldLevelDemandMap_T
_yieldLevelDemandMap
;
429
430
431
public
:
433
CapacityAdjustment_T
_dcsRegrade
;
434
436
AuthorizationLevel_T
_au
;
437
439
UPR_T
_upr
;
440
442
Availability_T
_nav
;
443
445
Availability_T
_gav
;
446
448
OverbookingRate_T
_acp
;
449
451
NbOfSeats_T
_etb
;
452
454
NbOfSeats_T
_staffNbOfBookings
;
455
457
NbOfSeats_T
_wlNbOfBookings
;
458
460
NbOfSeats_T
_groupNbOfBookings
;
461
};
462
463
}
464
#endif // __STDAIR_BOM_LEGCABIN_HPP
465
Generated on Mon Aug 27 2012 21:34:04 for StdAir by
1.8.1.2