StdAir Logo  0.43.0
C++ Standard Airline IT Library
FareFeaturesKey.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_FAREFEATURESKEY_HPP
00002 #define __STDAIR_BOM_FAREFEATURESKEY_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // StdAir
00008 #include <stdair/bom/KeyAbstract.hpp>
00009 #include <stdair/stdair_date_time_types.hpp>
00010 #include <stdair/stdair_demand_types.hpp>
00011 #include <stdair/stdair_inventory_types.hpp>
00012 
00013 namespace stdair  {
00014 
00018   struct FareFeaturesKey : public KeyAbstract {
00019   public:
00020     // /////////// Construction ///////////
00022     FareFeaturesKey (const TripType_T&, const DayDuration_T&,
00023                      const SaturdayStay_T&, const ChangeFees_T&,
00024                      const NonRefundable_T&, const DayDuration_T&);
00026     FareFeaturesKey (const FareFeaturesKey&);
00028     ~FareFeaturesKey ();
00029   private:
00031     FareFeaturesKey();
00032 
00033 
00034   public:
00035     // /////////// Getters //////////
00039     const TripType_T& getTripType() const {
00040       return _tripType;
00041     }
00042 
00046     const DayDuration_T& getAdvancePurchase() const {
00047       return _advancePurchase;
00048     }
00049 
00053     const SaturdayStay_T& getSaturdayStay() const {
00054       return _saturdayStay;
00055     }   
00056 
00060     const ChangeFees_T& getChangeFees() const {
00061       return _changeFees;
00062     }
00063 
00067     const NonRefundable_T& getRefundableOption() const {
00068       return _nonRefundable;
00069     }
00070 
00074     const DayDuration_T& getMinimumStay() const {
00075       return _minimumStay;
00076     }
00077     
00078 
00079   public:
00080     // /////////// Display support methods /////////
00086     void toStream (std::ostream& ioOut) const;
00087 
00093     void fromStream (std::istream& ioIn);
00094 
00100     const std::string toString() const;
00101 
00102 
00103   private:
00104     // ///////////////// Attributes ///////////////////
00108     TripType_T _tripType;
00109     
00113     DayDuration_T _advancePurchase;
00114      
00118     SaturdayStay_T _saturdayStay;
00119     
00123     ChangeFees_T _changeFees;
00124 
00128     NonRefundable_T _nonRefundable;
00129      
00133     DayDuration_T _minimumStay;
00134   };
00135 
00136 }
00137 #endif // __STDAIR_BOM_FAREFEATURESKEY_HPP