StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 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
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 
76  return _offeredCapacity;
77  }
78 
81  return _physicalCapacity;
82  }
83 
85  const NbOfSeats_T& getSoldSeat() const {
86  return _soldSeat;
87  }
88 
91  return _committedSpace;
92  }
93 
96  return _availabilityPool;
97  }
98 
101  return _availability;
102  }
103 
106  return _currentBidPrice;
107  }
108 
111  return _previousBidPrice;
112  }
113 
116  return _bidPriceVector;
117  }
118 
121  return _dcsRegrade;
122  }
123 
126  return _au;
127  }
128 
130  const UPR_T& getUPR() const {
131  return _upr;
132  }
133 
136  return _nav;
137  }
138 
141  return _gav;
142  }
143 
146  return _acp;
147  }
148 
150  const NbOfSeats_T& getETB() const {
151  return _etb;
152  }
153 
156  return _staffNbOfBookings;
157  }
158 
160  const NbOfSeats_T& getWLNbOfSeats() const {
161  return _wlNbOfBookings;
162  }
163 
166  return _groupNbOfBookings;
167  }
168 
171  return _virtualClassList;
172  }
173 
176  return _bidPriceVector;
177  }
178 
179 
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 
224  }
225 
227  void setRegradeAdjustment (const CapacityAdjustment_T& iRegradeAdjustment) {
228  _dcsRegrade = iRegradeAdjustment;
229  }
230 
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 
248  _gav = iGAV;
249  }
250 
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 //////////
321 
326  _virtualClassList.push_back (iVC);
327  }
328 
333  _virtualClassList.clear();
334  }
335 
340  _bidPriceVector.clear();
341  }
342 
346  void addDemandInformation (const YieldValue_T&, const MeanValue_T&,
347  const StdDevValue_T&);
348 
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 /////////
386 
391 
396 
399 
402 
405 
406  /* Committed space. */
408 
411 
414 
417 
420 
423 
426 
429 
430 
431  public:
434 
437 
440 
443 
446 
449 
452 
455 
458 
461  };
462 
463 }
464 #endif // __STDAIR_BOM_LEGCABIN_HPP
465