$treeview $search $mathjax
StdAir Logo  1.00.1
$projectbrief
$projectbrief
$searchbox

stdair/bom/VirtualClassStruct.hpp

Go to the documentation of this file.
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 #include <stdair/bom/BookingClassTypes.hpp>
00018 
00019 namespace stdair {
00020   // Forward declarations.
00021   class BookingClass;
00022 
00024   struct VirtualClassStruct : public StructAbstract {
00025   public:
00026     // /////////// Getters ///////////////
00028     const BookingClassList_T& getBookingClassList() const {
00029       return _bookingClassList;
00030     }
00031 
00033     const Yield_T& getYield() const {
00034       return _yield;
00035     }
00036 
00038     const MeanValue_T& getMean() const {
00039       return _mean;
00040     }
00041 
00043     const StdDevValue_T& getStdDev() const {
00044       return _stdDev;
00045     }
00046 
00048     const BookingLimit_T& getCumulatedBookingLimit () const {
00049       return _cumulatedBookingLimit;
00050     }
00051 
00053     const ProtectionLevel_T& getCumulatedProtection () const {
00054       return _cumulatedProtection;
00055     }
00056 
00058     const GeneratedDemandVector_T getGeneratedDemandVector () const;
00059     
00060   public:
00061     // /////////// Setters ///////////////
00063     void setYield (const Yield_T& iYield) {
00064       _yield = iYield;
00065     }
00066 
00068     void setMean (const MeanValue_T& iMean) {
00069       _mean = iMean;
00070     }
00071 
00073     void setStdDev (const StdDevValue_T& iStdDev) {
00074       _stdDev = iStdDev;
00075     }
00076     
00078     void setCumulatedBookingLimit (const BookingLimit_T& iBL) {
00079       _cumulatedBookingLimit = iBL;
00080     }
00081     
00083     void setCumulatedProtection (const ProtectionLevel_T& iP) {
00084       _cumulatedProtection = iP;
00085     }
00086 
00092     void addBookingClass (BookingClass& iBookingClass) {
00093       _bookingClassList.push_back(&iBookingClass);
00094     }
00095     
00096   public:
00097     // /////////// Display support method /////////////
00100     void toStream (std::ostream& ioOut) const;
00101 
00104     void fromStream (std::istream& ioIn);
00105 
00107     const std::string describe() const;
00108   
00109 
00110   public:
00111     // //////////// Constructors & Destructor ///////////////
00113     VirtualClassStruct (const VirtualClassStruct&);
00115     VirtualClassStruct (const BookingClassList_T&);
00117     ~VirtualClassStruct();
00118     
00119   private:
00121     VirtualClassStruct();
00122 
00123 
00124   private:
00125     // ///////////////////// Attributes //////////////////////
00127     BookingClassList_T _bookingClassList;
00128 
00130     Yield_T _yield;
00131 
00133     MeanValue_T _mean;
00134 
00136     StdDevValue_T _stdDev;
00137 
00139     BookingLimit_T _cumulatedBookingLimit;
00140 
00142     ProtectionLevel_T _cumulatedProtection;
00143   };
00144 
00145 }
00146 #endif // __STDAIR_BOM_VIRTUALCLASSSTRUCT_HPP