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/bom/BomAbstract.hpp> 00012 #include <stdair/bom/FareFamilyKey.hpp> 00013 #include <stdair/bom/FareFamilyTypes.hpp> 00014 00016 namespace boost { 00017 namespace serialization { 00018 class access; 00019 } 00020 } 00021 00022 namespace stdair { 00023 00027 class FareFamily : 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 FareFamilyKey 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 FamilyCode_T& getFamilyCode() const { 00054 return _key.getFamilyCode(); 00055 } 00056 00058 const HolderMap_T& getHolderMap() const { 00059 return _holderMap; 00060 } 00061 00062 00063 public: 00064 // /////////// Display support methods ///////// 00070 void toStream (std::ostream& ioOut) const { 00071 ioOut << toString(); 00072 } 00073 00079 void fromStream (std::istream& ioIn) { 00080 } 00081 00085 std::string toString() const; 00086 00090 const std::string describeKey() const { 00091 return _key.toString(); 00092 } 00093 00094 00095 public: 00096 // /////////// (Boost) Serialisation support methods ///////// 00100 template<class Archive> 00101 void serialize (Archive& ar, const unsigned int iFileVersion); 00102 00103 private: 00108 void serialisationImplementation(); 00109 00110 00111 protected: 00112 // ////////// Constructors and destructors ///////// 00116 FareFamily (const Key_T&); 00117 00121 virtual ~FareFamily(); 00122 00123 private: 00127 FareFamily(); 00128 00132 FareFamily (const FareFamily&); 00133 00134 00135 public: 00136 // ////////// Attributes ///////// 00140 Key_T _key; 00141 00145 BomAbstract* _parent; 00146 00150 HolderMap_T _holderMap; 00151 }; 00152 00153 } 00154 #endif // __STDAIR_BOM_FAREFAMILY_HPP 00155