StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
FareOptionStruct.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_FAREOPTIONSTRUCT_HPP
2 #define __STDAIR_BOM_FAREOPTIONSTRUCT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
11 #include <stdair/stdair_types.hpp>
14 
15 namespace stdair {
16 
20  struct FareOptionStruct : public StructAbstract {
21  public:
22  // /////////// Getters ///////////////
25  return _classPath;
26  }
27 
29  const Fare_T& getFare() const {
30  return _fare;
31  }
32 
35  return _avl;
36  }
37 
39  const ChangeFees_T getChangeFees() const {
40  return _changeFee;
41  }
42 
45  return _nonRefundable;
46  }
47 
50  return _saturdayStay;
51  }
52 
53 
54  public:
55  // /////////// Setters ///////////////
57  void addClassList (const std::string);
58 
60  void emptyClassList ();
61 
63  void setFare (const Fare_T& iFare) {
64  _fare = iFare;
65  }
66 
68  void setAvailability (const Availability_T& iAvl) {
69  _avl = iAvl;
70  }
71 
73  void setChangeFees (const ChangeFees_T iRes) {
74  _changeFee = iRes;
75  }
76 
78  void setNonRefundable (const NonRefundable_T iRes) {
79  _nonRefundable = iRes;
80  }
81 
83  void setSaturdayStay (const SaturdayStay_T iRes) {
84  _saturdayStay = iRes;
85  }
86 
87 
88  public:
89  // /////////// Display support method /////////////
95  void toStream (std::ostream& ioOut) const;
96 
102  void fromStream (std::istream& ioIn);
103 
107  const std::string describe() const;
108 
112  const std::string display() const;
113 
114 
115  public:
116  // //////////// Constructors & Destructor ///////////////
121 
125  FareOptionStruct (const std::string& iClassPath,
126  const Fare_T&, const ChangeFees_T&,
127  const NonRefundable_T&, const SaturdayStay_T&);
128 
133 
138 
139 
140  private:
141  // ///////////////////// Attributes //////////////////////
145  ClassList_StringList_T _classPath;
146 
150  Fare_T _fare;
151 
155  Availability_T _avl;
156 
160  ChangeFees_T _changeFee;
161 
165  NonRefundable_T _nonRefundable;
166 
170  SaturdayStay_T _saturdayStay;
171  };
172 
173 }
174 #endif // __STDAIR_BOM_FAREOPTIONSTRUCT_HPP
const std::string display() const
Structure holding the elements of a fare option.
const std::string describe() const
const Availability_T & getAvailability() const
const Fare_T & getFare() const
double Availability_T
std::vector< ClassList_String_T > ClassList_StringList_T
Handle on the StdAir library context.
const NonRefundable_T getNonRefundable() const
Base class for the light structures.
void fromStream(std::istream &ioIn)
void setSaturdayStay(const SaturdayStay_T iRes)
void setNonRefundable(const NonRefundable_T iRes)
void toStream(std::ostream &ioOut) const
void addClassList(const std::string)
const ClassList_StringList_T & getClassPath() const
void setAvailability(const Availability_T &iAvl)
void setChangeFees(const ChangeFees_T iRes)
const SaturdayStay_T getSaturdayStay() const
void setFare(const Fare_T &iFare)
const ChangeFees_T getChangeFees() const