StdAir Logo  1.00.12
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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
17
18namespace 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 ////////////
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
58 return _subclassCode;
59 }
60
63 return _au;
64 }
65
68 return _protection;
69 }
70
74 }
75
79 }
80
83 return _nego;
84 }
85
88 return _noShowPercentage;
89 }
90
94 }
95
98 return _nbOfBookings;
99 }
100
103 return _groupNbOfBookings;
104 }
105
109 }
110
113 return _staffNbOfBookings;
114 }
115
118 return _wlNbOfBookings;
119 }
120
123 return _nbOfCancellations;
124 }
125
127 const NbOfBookings_T& getETB() const {
128 return _etb;
129 }
130
134 }
135
139 }
140
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; }
156 return _cumuPriceDemMean;
157 }
159 return _cumuPriceDemStdDev;
160 }
163
167 }
168
169 public:
170 // /////////// Setters ////////////
174 }
175
178 _protection = iPL;
179 }
180
184 }
185
188 _au = iAU;
189 }
190
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
254
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 /////////
277
280
283
286
289
292
295
298
301
304
307
310
313
316
319
322
325
328
331
334
337
341
345
349
353
357
360 };
361
362}
363#endif // __STDAIR_BOM_BOOKINGCLASS_HPP
Handle on the StdAir library context.
unsigned short SubclassCode_T
std::string ClassCode_T
unsigned long int RandomSeed_T
double StdDevValue_T
NbOfRequests_T NbOfBookings_T
unsigned int NbOfSamples_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
double MeanValue_T
NbOfRequests_T NbOfCancellations_T
double AuthorizationLevel_T
double Availability_T
double NbOfSeats_T
std::vector< double > GeneratedDemandVector_T
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
StdDevValue_T _priceDemStdDev
MeanValue_T _priceDemMean
SubclassCode_T _subclassCode
void setProtection(const ProtectionLevel_T &iPL)
void setStdDev(const StdDevValue_T &iStdDev)
const Yield_T & getAdjustedYield() const
const Availability_T & getNetClassAvailability() const
void setMean(const MeanValue_T &iMean)
BookingClassKey Key_T
const NbOfBookings_T & getNbOfBookings() const
const MeanValue_T & getPriceDemMean() const
const OverbookingRate_T & getCancellationPercentage() const
void setPriceDemMean(const MeanValue_T &iMean)
StdDevValue_T _stdDev
void setCumulatedProtection(const ProtectionLevel_T &iPL)
const GeneratedDemandVector_T & getGeneratedDemandVector() const
void setAuthorizationLevel(const AuthorizationLevel_T &iAU)
void setCumuPriceDemMean(const MeanValue_T &iMean)
void generateDemandSamples(const NbOfSamples_T &)
NbOfBookings_T _nbOfBookings
const StdDevValue_T & getCumuPriceDemStdDev() const
void toStream(std::ostream &ioOut) const
const StdDevValue_T & getPriceDemStdDev() const
ProtectionLevel_T _cumulatedProtection
void fromStream(std::istream &ioIn)
const Availability_T & getNetRevenueAvailability() const
ProtectionLevel_T _protection
BomAbstract *const getParent() const
const BookingLimit_T & getCumulatedBookingLimit() const
NbOfCancellations_T _nbOfCancellations
OverbookingRate_T _cancellationPercentage
const MeanValue_T & getCumuPriceDemMean() const
NbOfBookings_T _wlNbOfBookings
const ProtectionLevel_T & getProtection() const
const Key_T & getKey() const
void setProductDemStdDev(const StdDevValue_T &iStdDev)
Availability_T _netClassAvailability
const Availability_T & getSegmentAvailability() const
const NbOfSeats_T & getNegotiatedSpace() const
const Yield_T & getYield() const
void setCumulatedBookingLimit(const BookingLimit_T &iBL)
MeanValue_T _productDemMean
const NbOfBookings_T & getNbOfGroupBookings() const
const OverbookingRate_T & getNoShowPercentage() const
const StdDevValue_T & getStdDev() const
OverbookingRate_T _noShowPercentage
NbOfBookings_T _etb
NbOfBookings_T _groupNbOfBookings
const MeanValue_T & getProductDemMean() const
void setProductDemMean(const MeanValue_T &iMean)
void setPriceDemStdDev(const StdDevValue_T &iStdDev)
const NbOfBookings_T & getNbOfStaffBookings() const
void cancel(const NbOfBookings_T &)
Availability_T _segmentAvailability
const NbOfBookings_T & getNbOfWLBookings() const
const StdDevValue_T & getProductDemStdDev() const
GeneratedDemandVector_T _generatedDemandVector
const NbOfBookings_T & getETB() const
void setSegmentAvailability(const Availability_T &iAvl)
MeanValue_T _cumuPriceDemMean
const MeanValue_T & getMean() const
std::string toString() const
const NbOfBookings_T & getNbOfPendingGroupBookings() const
void setYield(const Yield_T &iYield)
BomAbstract * _parent
const SubclassCode_T & getSubclassCode() const
const ClassCode_T & getClassCode() const
BookingLimit_T _cumulatedBookingLimit
const HolderMap_T & getHolderMap() const
const NbOfCancellations_T & getNbOfCancellations() const
StdDevValue_T _productDemStdDev
NbOfBookings_T _staffNbOfBookings
const AuthorizationLevel_T & getAuthorizationLevel() const
const ProtectionLevel_T & getCumulatedProtection() const
NbOfBookings_T _groupPendingNbOfBookings
Availability_T _netRevenueAvailability
void sell(const NbOfBookings_T &)
StdDevValue_T _cumuPriceDemStdDev
void setCumuPriceDemStdDev(const StdDevValue_T &iStdDev)
void setAdjustedYield(const Yield_T &iYield)
AuthorizationLevel_T _au
const std::string describeKey() const
const std::string toString() const
const ClassCode_T & getClassCode() const
Base class for Factory layer.
Definition: FacBom.hpp:22
Utility class for linking StdAir-based objects.
Base class for Factory layer.
Definition: FacCloneBom.hpp:22