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
BookingClass.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_BOOKINGCLASS_HPP
2
#define __STDAIR_BOM_BOOKINGCLASS_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/stdair_maths_types.hpp
>
13
#include <
stdair/stdair_rm_types.hpp
>
14
#include <
stdair/bom/BomAbstract.hpp
>
15
#include <
stdair/bom/BookingClassKey.hpp
>
16
#include <
stdair/bom/BookingClassTypes.hpp
>
17
18
namespace
stdair {
19
24
class
BookingClass
:
public
BomAbstract
{
25
template
<
typename
BOM>
friend
class
FacBom
;
26
template
<
typename
BOM>
friend
class
FacCloneBom
;
27
friend
class
FacBomManager
;
28
29
public
:
30
// ////////// Type definitions ////////////
32
typedef
BookingClassKey
Key_T
;
33
34
public
:
35
// /////////// Getters ////////////
37
const
Key_T
&
getKey
()
const
{
38
return
_key
;
39
}
40
42
const
ClassCode_T
&
getClassCode
()
const
{
43
return
_key
.
getClassCode
();
44
}
45
47
BomAbstract
*
const
getParent
()
const
{
48
return
_parent
;
49
}
50
52
const
HolderMap_T
&
getHolderMap
()
const
{
53
return
_holderMap
;
54
}
55
57
const
SubclassCode_T
&
getSubclassCode
()
const
{
58
return
_subclassCode
;
59
}
60
62
const
AuthorizationLevel_T
&
getAuthorizationLevel
()
const
{
63
return
_au
;
64
}
65
67
const
ProtectionLevel_T
&
getProtection
()
const
{
68
return
_protection
;
69
}
70
72
const
ProtectionLevel_T
&
getCumulatedProtection
()
const
{
73
return
_cumulatedProtection
;
74
}
75
77
const
BookingLimit_T
&
getCumulatedBookingLimit
()
const
{
78
return
_cumulatedBookingLimit
;
79
}
80
82
const
NbOfSeats_T
&
getNegotiatedSpace
()
const
{
83
return
_nego
;
84
}
85
87
const
OverbookingRate_T
&
getNoShowPercentage
()
const
{
88
return
_noShowPercentage
;
89
}
90
92
const
OverbookingRate_T
&
getCancellationPercentage
()
const
{
93
return
_cancellationPercentage
;
94
}
95
97
const
NbOfBookings_T
&
getNbOfBookings
()
const
{
98
return
_nbOfBookings
;
99
}
100
102
const
NbOfBookings_T
&
getNbOfGroupBookings
()
const
{
103
return
_groupNbOfBookings
;
104
}
105
107
const
NbOfBookings_T
&
getNbOfPendingGroupBookings
()
const
{
108
return
_groupPendingNbOfBookings
;
109
}
110
112
const
NbOfBookings_T
&
getNbOfStaffBookings
()
const
{
113
return
_staffNbOfBookings
;
114
}
115
117
const
NbOfBookings_T
&
getNbOfWLBookings
()
const
{
118
return
_wlNbOfBookings
;
119
}
120
122
const
NbOfCancellations_T
&
getNbOfCancellations
()
const
{
123
return
_nbOfCancellations
;
124
}
125
127
const
NbOfBookings_T
&
getETB
()
const
{
128
return
_etb
;
129
}
130
132
const
Availability_T
&
getNetClassAvailability
()
const
{
133
return
_netClassAvailability
;
134
}
135
137
const
Availability_T
&
getSegmentAvailability
()
const
{
138
return
_segmentAvailability
;
139
}
140
142
const
Availability_T
&
getNetRevenueAvailability
()
const
{
143
return
_netRevenueAvailability
;
144
}
145
147
const
Yield_T
&
getYield
()
const
{
return
_yield
; }
148
const
Yield_T
&
getAdjustedYield
()
const
{
return
_adjustedYield
; }
149
151
const
MeanValue_T
&
getMean
()
const
{
return
_mean
; }
152
const
StdDevValue_T
&
getStdDev
()
const
{
return
_stdDev
; }
153
const
MeanValue_T
&
getPriceDemMean
()
const
{
return
_priceDemMean
; }
154
const
StdDevValue_T
&
getPriceDemStdDev
()
const
{
return
_priceDemStdDev
; }
155
const
MeanValue_T
&
getCumuPriceDemMean
()
const
{
156
return
_cumuPriceDemMean
;
157
}
158
const
StdDevValue_T
&
getCumuPriceDemStdDev
()
const
{
159
return
_cumuPriceDemStdDev
;
160
}
161
const
MeanValue_T
&
getProductDemMean
()
const
{
return
_productDemMean
; }
162
const
StdDevValue_T
&
getProductDemStdDev
()
const
{
return
_productDemStdDev
; }
163
165
const
GeneratedDemandVector_T
&
getGeneratedDemandVector
()
const
{
166
return
_generatedDemandVector
;
167
}
168
169
public
:
170
// /////////// Setters ////////////
172
void
setCumulatedProtection
(
const
ProtectionLevel_T
& iPL) {
173
_cumulatedProtection
= iPL;
174
}
175
177
void
setProtection
(
const
ProtectionLevel_T
& iPL) {
178
_protection
= iPL;
179
}
180
182
void
setCumulatedBookingLimit
(
const
BookingLimit_T
& iBL) {
183
_cumulatedBookingLimit
= iBL;
184
}
185
187
void
setAuthorizationLevel
(
const
AuthorizationLevel_T
& iAU) {
188
_au
= iAU;
189
}
190
192
void
setSegmentAvailability
(
const
Availability_T
& iAvl) {
193
_segmentAvailability
= iAvl;
194
}
195
197
void
setYield
(
const
Yield_T
& iYield) {
198
_yield
= iYield;
199
_adjustedYield
= iYield;
200
}
201
void
setAdjustedYield
(
const
Yield_T
& iYield) {
_adjustedYield
= iYield; }
202
204
void
setMean
(
const
MeanValue_T
& iMean) {
_mean
= iMean; }
205
void
setStdDev
(
const
StdDevValue_T
& iStdDev) {
_stdDev
= iStdDev; }
206
void
setPriceDemMean
(
const
MeanValue_T
& iMean) {
_priceDemMean
= iMean; }
207
void
setPriceDemStdDev
(
const
StdDevValue_T
& iStdDev) {
208
_priceDemStdDev
= iStdDev;
209
}
210
void
setCumuPriceDemMean
(
const
MeanValue_T
& iMean) {
211
_cumuPriceDemMean
= iMean; }
212
void
setCumuPriceDemStdDev
(
const
StdDevValue_T
& iStdDev) {
213
_cumuPriceDemStdDev
= iStdDev;
214
}
215
void
setProductDemMean
(
const
MeanValue_T
& iMean) {
216
_productDemMean
= iMean;
217
}
218
void
setProductDemStdDev
(
const
StdDevValue_T
& iStdDev) {
219
_productDemStdDev
= iStdDev;
220
}
221
222
public
:
223
// /////////// Display support methods /////////
226
void
toStream
(std::ostream& ioOut)
const
{
227
ioOut <<
toString
();
228
}
229
232
void
fromStream
(std::istream& ioIn) {
233
}
234
236
std::string
toString
()
const
;
237
239
const
std::string
describeKey
()
const
{
240
return
_key
.
toString
();
241
}
242
243
public
:
244
// ////////////// Business Methods /////////////////
246
void
sell
(
const
NbOfBookings_T
&);
247
249
void
cancel
(
const
NbOfBookings_T
&);
250
253
void
generateDemandSamples
(
const
NbOfSamples_T
&);
254
257
void
generateDemandSamples
(
const
NbOfSamples_T
&,
const
RandomSeed_T
&);
258
259
protected
:
260
// ////////// Constructors and destructors /////////
262
BookingClass
(
const
Key_T
&);
264
virtual
~BookingClass
();
265
266
private
:
268
BookingClass
();
270
BookingClass
(
const
BookingClass
&);
271
272
273
protected
:
274
// ////////// Attributes /////////
276
Key_T
_key
;
277
279
BomAbstract
*
_parent
;
280
282
HolderMap_T
_holderMap
;
283
285
SubclassCode_T
_subclassCode
;
286
288
ProtectionLevel_T
_cumulatedProtection
;
289
291
ProtectionLevel_T
_protection
;
292
294
BookingLimit_T
_cumulatedBookingLimit
;
295
297
AuthorizationLevel_T
_au
;
298
300
NbOfSeats_T
_nego
;
301
303
OverbookingRate_T
_noShowPercentage
;
304
306
OverbookingRate_T
_cancellationPercentage
;
307
309
NbOfBookings_T
_nbOfBookings
;
310
312
NbOfBookings_T
_groupNbOfBookings
;
313
315
NbOfBookings_T
_groupPendingNbOfBookings
;
316
318
NbOfBookings_T
_staffNbOfBookings
;
319
321
NbOfBookings_T
_wlNbOfBookings
;
322
324
NbOfCancellations_T
_nbOfCancellations
;
325
327
NbOfBookings_T
_etb
;
328
330
Availability_T
_netClassAvailability
;
331
333
Availability_T
_segmentAvailability
;
334
336
Availability_T
_netRevenueAvailability
;
337
339
Yield_T
_yield
;
340
Yield_T
_adjustedYield
;
341
343
MeanValue_T
_mean
;
344
StdDevValue_T
_stdDev
;
345
347
MeanValue_T
_priceDemMean
;
348
StdDevValue_T
_priceDemStdDev
;
349
351
MeanValue_T
_cumuPriceDemMean
;
352
StdDevValue_T
_cumuPriceDemStdDev
;
353
355
MeanValue_T
_productDemMean
;
356
StdDevValue_T
_productDemStdDev
;
357
359
GeneratedDemandVector_T
_generatedDemandVector
;
360
};
361
362
}
363
#endif // __STDAIR_BOM_BOOKINGCLASS_HPP
Generated on Sat Dec 22 2012 16:51:53 for StdAir by
1.8.1.1