00001 #ifndef __STDAIR_BOM_AIRLINECLASSLIST_HPP 00002 #define __STDAIR_BOM_AIRLINECLASSLIST_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <iosfwd> 00009 #include <string> 00010 // StdAir 00011 #include <stdair/bom/BomAbstract.hpp> 00012 #include <stdair/bom/AirlineClassListKey.hpp> 00013 #include <stdair/bom/AirlineClassListTypes.hpp> 00014 00016 namespace boost { 00017 namespace serialization { 00018 class access; 00019 } 00020 } 00021 00022 namespace stdair { 00023 00027 class AirlineClassList : public BomAbstract { 00028 template <typename BOM> friend class FacBom; 00029 friend class FacBomManager; 00030 friend class boost::serialization::access; 00031 00032 public: 00033 // ////////// Type definitions //////////// 00037 typedef AirlineClassListKey Key_T; 00038 00039 00040 public: 00041 // ////////// Getters //////////// 00043 const Key_T& getKey() const { 00044 return _key; 00045 } 00046 00048 BomAbstract* const getParent() const { 00049 return _parent; 00050 } 00051 00053 const AirlineCodeList_T& getAirlineCodeList() const { 00054 return _key.getAirlineCodeList(); 00055 } 00056 00058 const ClassList_StringList_T& getClassCodeList() const { 00059 return _key.getClassCodeList(); 00060 } 00061 00063 const HolderMap_T& getHolderMap() const { 00064 return _holderMap; 00065 } 00066 00068 const stdair::Yield_T& getYield() const { 00069 return _yield; 00070 } 00071 00073 const stdair::Fare_T& getFare() const { 00074 return _fare; 00075 } 00076 00077 public: 00078 // /////////// Setters ////////////// 00079 void setYield (const Yield_T& iYield) { 00080 _yield = iYield; 00081 } 00082 00083 void setFare (const Fare_T& iFare) { 00084 _fare = iFare; 00085 } 00086 00087 public: 00088 // /////////// Display support methods ///////// 00094 void toStream (std::ostream& ioOut) const { 00095 ioOut << toString(); 00096 } 00097 00103 void fromStream (std::istream& ioIn) { 00104 } 00105 00109 std::string toString() const; 00110 00114 const std::string describeKey() const { 00115 return _key.toString(); 00116 } 00117 00118 00119 public: 00120 // /////////// (Boost) Serialisation support methods ///////// 00124 template<class Archive> 00125 void serialize (Archive& ar, const unsigned int iFileVersion); 00126 00127 private: 00132 void serialisationImplementationExport() const; 00133 void serialisationImplementationImport(); 00134 00135 00136 protected: 00137 // ////////// Constructors and destructors ///////// 00141 AirlineClassList (const Key_T&); 00145 virtual ~AirlineClassList(); 00146 00147 private: 00151 AirlineClassList(); 00152 00156 AirlineClassList (const AirlineClassList&); 00157 00158 00159 protected: 00160 // ////////// Attributes ///////// 00164 Key_T _key; 00165 00169 BomAbstract* _parent; 00170 00174 HolderMap_T _holderMap; 00175 00176 /* 00177 * Yield value. 00178 */ 00179 Yield_T _yield; 00180 00181 /* 00182 * Fare value. 00183 */ 00184 Fare_T _fare; 00185 }; 00186 00187 } 00188 #endif // __STDAIR_BOM_AIRLINECLASSLIST_HPP 00189