$treeview $search $mathjax
StdAir Logo  1.00.1
$projectbrief
$projectbrief
$searchbox

stdair/bom/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     template <typename BOM> friend class FacCloneBom;
00030     friend class FacBomManager;
00031     friend class boost::serialization::access;
00032 
00033   public:
00034     // ////////// Type definitions ////////////
00038     typedef AirlineClassListKey Key_T;
00039   
00040 
00041   public:
00042     // ////////// Getters ////////////
00044     const Key_T& getKey() const {
00045       return _key;
00046     }
00047 
00049     BomAbstract* const getParent() const {
00050       return _parent;
00051     }
00052 
00054     const AirlineCodeList_T& getAirlineCodeList() const {
00055       return _key.getAirlineCodeList();
00056     }
00057 
00059     const ClassList_StringList_T& getClassCodeList() const {
00060       return _key.getClassCodeList();
00061     }
00062 
00064     const  HolderMap_T& getHolderMap() const {
00065       return _holderMap;
00066     }
00067     
00069     const stdair::Yield_T& getYield() const {
00070       return _yield;
00071     }
00072 
00074     const stdair::Fare_T& getFare() const {
00075       return _fare;
00076     }
00077 
00078   public:
00079     // /////////// Setters //////////////
00080     void setYield (const Yield_T& iYield) {
00081       _yield = iYield;
00082     }
00083     
00084     void setFare (const Fare_T& iFare) {
00085       _fare = iFare;
00086     }
00087 
00088   public:
00089     // /////////// Display support methods /////////
00095     void toStream (std::ostream& ioOut) const {
00096       ioOut << toString();
00097     }
00098 
00104     void fromStream (std::istream& ioIn) {
00105     }
00106 
00110     std::string toString() const;
00111     
00115     const std::string describeKey() const {
00116       return _key.toString();
00117     }
00118     
00119     
00120   public:
00121     // /////////// (Boost) Serialisation support methods /////////
00125     template<class Archive>
00126     void serialize (Archive& ar, const unsigned int iFileVersion);
00127 
00128   private:
00133     void serialisationImplementationExport() const;
00134     void serialisationImplementationImport();
00135 
00136 
00137   protected:
00138     // ////////// Constructors and destructors /////////
00142     AirlineClassList (const Key_T&);
00146     virtual ~AirlineClassList();
00147 
00148   private:
00152     AirlineClassList();
00153 
00157     AirlineClassList (const AirlineClassList&);
00158 
00159 
00160   protected:
00161     // ////////// Attributes /////////
00165     Key_T _key;
00166 
00170     BomAbstract* _parent;
00171 
00175     HolderMap_T _holderMap;
00176  
00177     /*
00178      * Yield value.
00179      */
00180     Yield_T _yield;
00181 
00182     /*
00183      * Fare value.
00184      */
00185     Fare_T _fare;
00186   };
00187 
00188 }
00189 #endif // __STDAIR_BOM_AIRLINECLASSLIST_HPP
00190