StdAir Logo  0.43.0
C++ Standard Airline IT Library
AirlineClassList.hpp
Go to the documentation of this file.
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 serialisationImplementation();
00133 
00134 
00135   protected:
00136     // ////////// Constructors and destructors /////////
00140     AirlineClassList (const Key_T&);
00144     virtual ~AirlineClassList();
00145 
00146   private:
00150     AirlineClassList();
00151 
00155     AirlineClassList (const AirlineClassList&);
00156 
00157 
00158   protected:
00159     // ////////// Attributes /////////
00163     Key_T _key;
00164 
00168     BomAbstract* _parent;
00169 
00173     HolderMap_T _holderMap;
00174  
00175     /*
00176      * Yield value.
00177      */
00178     Yield_T _yield;
00179 
00180     /*
00181      * Fare value.
00182      */
00183     Fare_T _fare;
00184   };
00185 
00186 }
00187 #endif // __STDAIR_BOM_AIRLINECLASSLIST_HPP
00188