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
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
19
namespace
stdair {
20
25
class
LegCabin
:
public
BomAbstract
{
26
template
<
typename
BOM>
friend
class
FacBom
;
27
template
<
typename
BOM>
friend
class
FacCloneBom
;
28
friend
class
FacBomManager
;
29
30
public
:
31
// ////////// Type definitions ////////////
35
typedef
LegCabinKey
Key_T
;
36
37
public
:
38
// /////////// Getters ////////////
42
const
Key_T
&
getKey
()
const
{
43
return
_key
;
44
}
45
49
BomAbstract
*
const
getParent
()
const
{
50
return
_parent
;
51
}
52
56
const
CabinCode_T
&
getCabinCode
()
const
{
57
return
_key
.
getCabinCode
();
58
}
59
67
const
MapKey_T
getFullerKey
()
const
;
68
72
const
HolderMap_T
&
getHolderMap
()
const
{
73
return
_holderMap
;
74
}
75
77
const
CabinCapacity_T
&
getOfferedCapacity
()
const
{
78
return
_offeredCapacity
;
79
}
80
82
const
CabinCapacity_T
&
getPhysicalCapacity
()
const
{
83
return
_physicalCapacity
;
84
}
85
87
const
NbOfSeats_T
&
getSoldSeat
()
const
{
88
return
_soldSeat
;
89
}
90
92
const
CommittedSpace_T
&
getCommittedSpace
()
const
{
93
return
_committedSpace
;
94
}
95
97
const
Availability_T
&
getAvailabilityPool
()
const
{
98
return
_availabilityPool
;
99
}
100
102
const
Availability_T
&
getAvailability
()
const
{
103
return
_availability
;
104
}
105
107
const
BidPrice_T
&
getCurrentBidPrice
()
const
{
108
return
_currentBidPrice
;
109
}
110
112
const
BidPrice_T
&
getPreviousBidPrice
()
const
{
113
return
_previousBidPrice
;
114
}
115
117
const
BidPriceVector_T
&
getBidPriceVector
()
const
{
118
return
_bidPriceVector
;
119
}
120
122
const
CapacityAdjustment_T
&
getRegradeAdjustment
()
const
{
123
return
_dcsRegrade
;
124
}
125
127
const
AuthorizationLevel_T
&
getAuthorizationLevel
()
const
{
128
return
_au
;
129
}
130
132
const
UPR_T
&
getUPR
()
const
{
133
return
_upr
;
134
}
135
137
const
Availability_T
&
getNetAvailability
()
const
{
138
return
_nav
;
139
}
140
142
const
Availability_T
&
getGrossAvailability
()
const
{
143
return
_gav
;
144
}
145
147
const
OverbookingRate_T
&
getAvgCancellationPercentage
()
const
{
148
return
_acp
;
149
}
150
152
const
NbOfSeats_T
&
getETB
()
const
{
153
return
_etb
;
154
}
155
157
const
NbOfSeats_T
&
getStaffNbOfSeats
()
const
{
158
return
_staffNbOfBookings
;
159
}
160
162
const
NbOfSeats_T
&
getWLNbOfSeats
()
const
{
163
return
_wlNbOfBookings
;
164
}
165
167
const
NbOfSeats_T
&
getGroupNbOfSeats
()
const
{
168
return
_groupNbOfBookings
;
169
}
170
172
VirtualClassList_T
&
getVirtualClassList
() {
173
return
_virtualClassList
;
174
}
175
177
BidPriceVector_T
&
getBidPriceVector
() {
178
return
_bidPriceVector
;
179
}
180
181
183
const
YieldLevelDemandMap_T
&
getYieldLevelDemandMap
() {
184
return
_yieldLevelDemandMap
;
185
}
186
187
188
public
:
189
// ///////////// Setters ///////////////
191
void
setCapacities
(
const
CabinCapacity_T
& iCapacity);
192
194
void
setSoldSeat
(
const
NbOfSeats_T
& iSoldSeat) {
195
_soldSeat
= iSoldSeat;
196
}
197
199
void
setCommittedSpace
(
const
CommittedSpace_T
& iCommittedSpace) {
200
_committedSpace
= iCommittedSpace;
201
}
202
204
void
setAvailabilityPool
(
const
Availability_T
& iAvailabilityPool) {
205
_availabilityPool
= iAvailabilityPool;
206
}
207
209
void
setAvailability
(
const
Availability_T
& iAvailability) {
210
_availability
= iAvailability;
211
}
212
214
void
setCurrentBidPrice
(
const
BidPrice_T
& iBidPrice) {
215
_currentBidPrice
= iBidPrice;
216
}
217
219
void
setPreviousBidPrice
(
const
BidPrice_T
& iBidPrice) {
220
_previousBidPrice
= iBidPrice;
221
}
222
224
void
updatePreviousBidPrice
() {
225
_previousBidPrice
=
_currentBidPrice
;
226
}
227
229
void
setRegradeAdjustment
(
const
CapacityAdjustment_T
& iRegradeAdjustment) {
230
_dcsRegrade
= iRegradeAdjustment;
231
}
232
234
void
setAuthorizationLevel
(
const
AuthorizationLevel_T
& iAU) {
235
_au
= iAU;
236
}
237
239
void
setUPR
(
const
UPR_T
& iUPR) {
240
_upr
= iUPR;
241
}
242
244
void
setNetAvailability
(
const
Availability_T
& iNAV) {
245
_nav
= iNAV;
246
}
247
249
void
setGrossAvailability
(
const
Availability_T
& iGAV) {
250
_gav
= iGAV;
251
}
252
254
void
setAvgCancellationPercentage
(
const
OverbookingRate_T
& iACP) {
255
_acp
= iACP;
256
}
257
259
void
setETB
(
const
NbOfSeats_T
& iETB) {
260
_etb
= iETB;
261
}
262
264
void
setStaffNbOfSeats
(
const
NbOfSeats_T
& iStaffSeats) {
265
_staffNbOfBookings
= iStaffSeats;
266
}
267
269
void
setWLNbOfSeats
(
const
NbOfSeats_T
& iWLSeats) {
270
_wlNbOfBookings
= iWLSeats;
271
}
272
274
void
setGroupNbOfSeats
(
const
NbOfSeats_T
& iGroupSeats) {
275
_groupNbOfBookings
= iGroupSeats;
276
}
277
279
void
updateCurrentBidPrice
();
280
281
282
public
:
283
// /////////// Display support methods /////////
288
void
toStream
(std::ostream& ioOut)
const
{
289
ioOut <<
toString
();
290
}
291
296
void
fromStream
(std::istream& ioIn) {
297
}
298
302
std::string
toString
()
const
;
303
307
const
std::string
describeKey
()
const
{
308
return
_key
.
toString
();
309
}
310
314
const
std::string
displayVirtualClassList
()
const
;
315
316
317
public
:
318
// /////////// Business methods //////////
322
void
updateFromReservation
(
const
NbOfBookings_T
&);
323
327
void
addVirtualClass
(
const
VirtualClassStruct
& iVC) {
328
_virtualClassList
.push_back (iVC);
329
}
330
334
void
emptyVirtualClassList
() {
335
_virtualClassList
.clear();
336
}
337
341
void
emptyBidPriceVector
() {
342
_bidPriceVector
.clear();
343
}
344
348
void
addDemandInformation
(
const
YieldValue_T
&,
const
MeanValue_T
&,
349
const
StdDevValue_T
&);
350
354
void
emptyYieldLevelDemandMap
() {
355
_yieldLevelDemandMap
.clear();
356
}
357
358
359
protected
:
360
// ////////// Constructors and destructors /////////
364
LegCabin
(
const
Key_T
&);
368
~LegCabin
();
369
370
371
private
:
375
LegCabin
();
379
LegCabin
(
const
LegCabin
&);
380
381
382
protected
:
383
// ////////// Attributes /////////
387
Key_T
_key
;
388
392
BomAbstract
*
_parent
;
393
397
HolderMap_T
_holderMap
;
398
400
CabinCapacity_T
_offeredCapacity
;
401
403
CabinCapacity_T
_physicalCapacity
;
404
406
NbOfSeats_T
_soldSeat
;
407
408
/* Committed space. */
409
CommittedSpace_T
_committedSpace
;
410
412
Availability_T
_availabilityPool
;
413
415
Availability_T
_availability
;
416
418
BidPrice_T
_currentBidPrice
;
419
421
BidPrice_T
_previousBidPrice
;
422
424
BidPriceVector_T
_bidPriceVector
;
425
427
VirtualClassList_T
_virtualClassList
;
428
430
YieldLevelDemandMap_T
_yieldLevelDemandMap
;
431
432
433
public
:
435
CapacityAdjustment_T
_dcsRegrade
;
436
438
AuthorizationLevel_T
_au
;
439
441
UPR_T
_upr
;
442
444
Availability_T
_nav
;
445
447
Availability_T
_gav
;
448
450
OverbookingRate_T
_acp
;
451
453
NbOfSeats_T
_etb
;
454
456
NbOfSeats_T
_staffNbOfBookings
;
457
459
NbOfSeats_T
_wlNbOfBookings
;
460
462
NbOfSeats_T
_groupNbOfBookings
;
463
};
464
465
}
466
#endif // __STDAIR_BOM_LEGCABIN_HPP
467
Generated on Sat Dec 22 2012 16:51:53 for StdAir by
1.8.1.1