StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
FareOptionStruct.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_FAREOPTIONSTRUCT_HPP
00002 #define __STDAIR_BOM_FAREOPTIONSTRUCT_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iosfwd>
00009 #include <string>
00010 // StdAir
00011 #include <stdair/stdair_types.hpp>
00012 #include <stdair/basic/StructAbstract.hpp>
00013 #include <stdair/bom/BookingClassTypes.hpp>
00014 
00015 namespace stdair {
00016 
00020   struct FareOptionStruct : public StructAbstract {
00021   public:
00022     // /////////// Getters ///////////////
00024     const ClassList_StringList_T& getClassPath() const {
00025       return _classPath;
00026     }
00027 
00029     const Fare_T& getFare() const {
00030       return _fare;
00031     }
00032 
00034     const Availability_T& getAvailability() const {
00035       return _avl;
00036     }
00037     
00039     const ChangeFees_T getChangeFees() const {
00040       return _changeFee;
00041     }
00042 
00044     const NonRefundable_T getNonRefundable() const {
00045       return _nonRefundable;
00046     }
00047 
00049     const SaturdayStay_T getSaturdayStay() const {
00050       return _saturdayStay;
00051     }
00052 
00053 
00054   public:
00055     // /////////// Setters ///////////////
00057     void addClassList (const std::string);
00058 
00060     void emptyClassList ();
00061 
00063     void setFare (const Fare_T& iFare) {
00064       _fare = iFare;
00065     }
00066 
00068     void setAvailability (const Availability_T& iAvl) {
00069       _avl = iAvl;
00070     }
00071 
00073     void setChangeFees (const ChangeFees_T iRes) {
00074       _changeFee = iRes;
00075     }
00076 
00078     void setNonRefundable (const NonRefundable_T iRes) {
00079       _nonRefundable = iRes;
00080     }
00081 
00083     void setSaturdayStay (const SaturdayStay_T iRes) {
00084       _saturdayStay = iRes;
00085     }
00086         
00087 
00088   public:
00089     // /////////// Display support method /////////////
00095     void toStream (std::ostream& ioOut) const;
00096 
00102     void fromStream (std::istream& ioIn);
00103 
00107     const std::string describe() const;
00108   
00112     const std::string display() const;
00113   
00114 
00115   public:
00116     // //////////// Constructors & Destructor ///////////////
00120     FareOptionStruct();
00121 
00125     FareOptionStruct (const std::string& iClassPath,
00126                       const Fare_T&, const ChangeFees_T&,
00127                       const NonRefundable_T&, const SaturdayStay_T&);
00128 
00132     FareOptionStruct (const FareOptionStruct&);
00133 
00137     ~FareOptionStruct();
00138     
00139 
00140   private:
00141     // ///////////////////// Attributes //////////////////////
00145     ClassList_StringList_T _classPath;
00146 
00150     Fare_T _fare;
00151 
00155     Availability_T _avl;
00156 
00160     ChangeFees_T _changeFee;
00161 
00165     NonRefundable_T _nonRefundable;
00166 
00170     SaturdayStay_T _saturdayStay;
00171   };
00172 
00173 }
00174 #endif // __STDAIR_BOM_FAREOPTIONSTRUCT_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines