$treeview $search $mathjax
00001 #ifndef __STDAIR_BOM_FAREFAMILY_HPP 00002 #define __STDAIR_BOM_FAREFAMILY_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <iosfwd> 00009 #include <string> 00010 // StdAir 00011 #include <stdair/stdair_rm_types.hpp> 00012 #include <stdair/bom/BomAbstract.hpp> 00013 #include <stdair/bom/FareFamilyKey.hpp> 00014 #include <stdair/bom/FareFamilyTypes.hpp> 00015 00017 namespace boost { 00018 namespace serialization { 00019 class access; 00020 } 00021 } 00022 00023 namespace stdair { 00024 00028 class FareFamily : public BomAbstract { 00029 template <typename BOM> friend class FacBom; 00030 template <typename BOM> friend class FacCloneBom; 00031 friend class FacBomManager; 00032 friend class boost::serialization::access; 00033 00034 public: 00035 // ////////// Type definitions //////////// 00039 typedef FareFamilyKey Key_T; 00040 00041 00042 public: 00043 // /////////// Getters //////////// 00045 const Key_T& getKey() const { 00046 return _key; 00047 } 00048 00050 BomAbstract* const getParent() const { 00051 return _parent; 00052 } 00053 00055 const FamilyCode_T& getFamilyCode() const { 00056 return _key.getFamilyCode(); 00057 } 00058 00060 const HolderMap_T& getHolderMap() const { 00061 return _holderMap; 00062 } 00063 00065 const FRAT5Curve_T& getFrat5Curve () const { 00066 return _frat5Curve; 00067 } 00068 00070 const FFDisutilityCurve_T& getDisutilityCurve () const { 00071 return _disutilityCurve; 00072 } 00073 00075 const MeanValue_T& getMean () const { return _mean; } 00076 const StdDevValue_T& getStdDev () const {return _stdDev; } 00077 00079 const MeanStdDevPairVector_T& getMeanStdDev () const {return _meanStdDev; } 00080 00081 00082 public: 00083 // /////////// Setters //////////// 00085 void setFrat5Curve (const FRAT5Curve_T& iFRAT5Curve) { 00086 _frat5Curve = iFRAT5Curve; 00087 } 00088 00090 void setDisutilityCurve (const FFDisutilityCurve_T& iDisutilityCurve) { 00091 _disutilityCurve = iDisutilityCurve; 00092 } 00093 00095 void setMean (const MeanValue_T& iMean) { _mean = iMean; } 00096 void setStdDev (const StdDevValue_T& iStdDev) { _stdDev = iStdDev; } 00097 00099 void setMeanStdDev (const MeanStdDevPairVector_T& iMeanStdDev){ 00100 _meanStdDev = iMeanStdDev; 00101 } 00102 00103 00104 public: 00105 // /////////// Display support methods ///////// 00111 void toStream (std::ostream& ioOut) const { 00112 ioOut << toString(); 00113 } 00114 00120 void fromStream (std::istream& ioIn) { 00121 } 00122 00126 std::string toString() const; 00127 00131 const std::string describeKey() const { 00132 return _key.toString(); 00133 } 00134 00135 00136 public: 00137 // /////////// (Boost) Serialisation support methods ///////// 00141 template<class Archive> 00142 void serialize (Archive& ar, const unsigned int iFileVersion); 00143 00144 00145 private: 00150 void serialisationImplementationExport() const; 00151 void serialisationImplementationImport(); 00152 00153 00154 protected: 00155 // ////////// Constructors and destructors ///////// 00159 FareFamily (const Key_T&); 00160 00164 virtual ~FareFamily(); 00165 00166 00167 private: 00171 FareFamily(); 00172 00176 FareFamily (const FareFamily&); 00177 00178 00179 public: 00180 // ////////// Attributes ///////// 00184 Key_T _key; 00185 00189 BomAbstract* _parent; 00190 00194 HolderMap_T _holderMap; 00195 00199 FRAT5Curve_T _frat5Curve; 00200 00204 FFDisutilityCurve_T _disutilityCurve; 00205 00207 MeanValue_T _mean; 00208 StdDevValue_T _stdDev; 00209 00213 MeanStdDevPairVector_T _meanStdDev; 00214 }; 00215 00216 } 00217 #endif // __STDAIR_BOM_FAREFAMILY_HPP 00218