00001 #ifndef __STDAIR_BOM_VIRTUALCLASSSTRUCT_HPP 00002 #define __STDAIR_BOM_VIRTUALCLASSSTRUCT_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <iosfwd> 00009 #include <string> 00010 #include <vector> 00011 // StdAir 00012 #include <stdair/stdair_basic_types.hpp> 00013 #include <stdair/stdair_inventory_types.hpp> 00014 #include <stdair/stdair_maths_types.hpp> 00015 #include <stdair/stdair_rm_types.hpp> 00016 #include <stdair/basic/StructAbstract.hpp> 00017 00018 namespace stdair { 00019 // Forward declarations. 00020 class BookingClass; 00021 00023 struct VirtualClassStruct : public StructAbstract { 00024 public: 00025 // /////////// Getters /////////////// 00027 const Yield_T& getYield() const { 00028 return _yield; 00029 } 00030 00032 const MeanValue_T& getMean() const { 00033 return _mean; 00034 } 00035 00037 const StdDevValue_T& getStdDev() const { 00038 return _stdDev; 00039 } 00040 00042 const BookingLimit_T& getCumulatedBookingLimit () const { 00043 return _cumulatedBookingLimit; 00044 } 00045 00047 const ProtectionLevel_T& getCumulatedProtection () const { 00048 return _cumulatedProtection; 00049 } 00050 00052 const GeneratedDemandVector_T& getGeneratedDemandVector () const; 00053 00054 public: 00055 // /////////// Setters /////////////// 00057 void setYield (const Yield_T& iYield) { 00058 _yield = iYield; 00059 } 00060 00062 void setMean (const MeanValue_T& iMean) { 00063 _mean = iMean; 00064 } 00065 00067 void setStdDev (const StdDevValue_T& iStdDev) { 00068 _stdDev = iStdDev; 00069 } 00070 00072 void setCumulatedBookingLimit (const BookingLimit_T& iBL) { 00073 _cumulatedBookingLimit = iBL; 00074 } 00075 00077 void setCumulatedProtection (const ProtectionLevel_T& iP) { 00078 _cumulatedProtection = iP; 00079 } 00080 00081 public: 00082 // /////////// Display support method ///////////// 00085 void toStream (std::ostream& ioOut) const; 00086 00089 void fromStream (std::istream& ioIn); 00090 00092 const std::string describe() const; 00093 00094 00095 public: 00096 // //////////// Constructors & Destructor /////////////// 00098 VirtualClassStruct (const VirtualClassStruct&); 00100 VirtualClassStruct (BookingClass&); 00102 ~VirtualClassStruct(); 00103 00104 private: 00106 VirtualClassStruct(); 00107 00108 00109 private: 00110 // ///////////////////// Attributes ////////////////////// 00112 BookingClass* _bookingClass; 00113 00115 Yield_T _yield; 00116 00118 MeanValue_T _mean; 00119 00121 StdDevValue_T _stdDev; 00122 00124 BookingLimit_T _cumulatedBookingLimit; 00125 00127 ProtectionLevel_T _cumulatedProtection; 00128 }; 00129 00130 } 00131 #endif // __STDAIR_BOM_VIRTUALCLASSSTRUCT_HPP