StdAir Logo  0.45.0
C++ Standard Airline IT Object Library
FareFamily.hpp
Go to the documentation of this file.
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 serialisationImplementationExport() const;
00109     void serialisationImplementationImport();
00110 
00111 
00112   protected:
00113     // ////////// Constructors and destructors /////////
00117     FareFamily (const Key_T&);
00118 
00122     virtual ~FareFamily();
00123 
00124   private:
00128     FareFamily();
00129 
00133     FareFamily (const FareFamily&);
00134 
00135 
00136   public:
00137     // ////////// Attributes /////////
00141     Key_T _key;
00142 
00146     BomAbstract* _parent;
00147     
00151     HolderMap_T _holderMap;
00152   };
00153 
00154 }
00155 #endif // __STDAIR_BOM_FAREFAMILY_HPP
00156