StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
VirtualClassStruct.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_VIRTUALCLASSSTRUCT_HPP
2 #define __STDAIR_BOM_VIRTUALCLASSSTRUCT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 #include <vector>
11 // StdAir
18 
19 namespace stdair {
20  // Forward declarations.
21  class BookingClass;
22 
25  public:
26  // /////////// Getters ///////////////
29  return _bookingClassList;
30  }
31 
33  const Yield_T& getYield() const {
34  return _yield;
35  }
36 
38  const MeanValue_T& getMean() const {
39  return _mean;
40  }
41 
43  const StdDevValue_T& getStdDev() const {
44  return _stdDev;
45  }
46 
49  return _cumulatedBookingLimit;
50  }
51 
54  return _cumulatedProtection;
55  }
56 
59 
60  public:
61  // /////////// Setters ///////////////
63  void setYield (const Yield_T& iYield) {
64  _yield = iYield;
65  }
66 
68  void setMean (const MeanValue_T& iMean) {
69  _mean = iMean;
70  }
71 
73  void setStdDev (const StdDevValue_T& iStdDev) {
74  _stdDev = iStdDev;
75  }
76 
79  _cumulatedBookingLimit = iBL;
80  }
81 
84  _cumulatedProtection = iP;
85  }
86 
92  void addBookingClass (BookingClass& iBookingClass) {
93  _bookingClassList.push_back(&iBookingClass);
94  }
95 
96  public:
97  // /////////// Display support method /////////////
100  void toStream (std::ostream& ioOut) const;
101 
104  void fromStream (std::istream& ioIn);
105 
107  const std::string describe() const;
108 
109 
110  public:
111  // //////////// Constructors & Destructor ///////////////
118 
119  private:
122 
123 
124  private:
125  // ///////////////////// Attributes //////////////////////
127  BookingClassList_T _bookingClassList;
128 
130  Yield_T _yield;
131 
133  MeanValue_T _mean;
134 
136  StdDevValue_T _stdDev;
137 
139  BookingLimit_T _cumulatedBookingLimit;
140 
142  ProtectionLevel_T _cumulatedProtection;
143  };
144 
145 }
146 #endif // __STDAIR_BOM_VIRTUALCLASSSTRUCT_HPP
const BookingLimit_T & getCumulatedBookingLimit() const
void setYield(const Yield_T &iYield)
Handle on the StdAir library context.
void setStdDev(const StdDevValue_T &iStdDev)
const StdDevValue_T & getStdDev() const
Base class for the light structures.
std::list< BookingClass * > BookingClassList_T
double StdDevValue_T
void fromStream(std::istream &ioIn)
double MeanValue_T
const MeanValue_T & getMean() const
void addBookingClass(BookingClass &iBookingClass)
const GeneratedDemandVector_T getGeneratedDemandVector() const
std::vector< double > GeneratedDemandVector_T
const std::string describe() const
const ProtectionLevel_T & getCumulatedProtection() const
void setCumulatedBookingLimit(const BookingLimit_T &iBL)
const BookingClassList_T & getBookingClassList() const
const Yield_T & getYield() const
void setMean(const MeanValue_T &iMean)
void setCumulatedProtection(const ProtectionLevel_T &iP)
void toStream(std::ostream &ioOut) const