StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FareFeatures.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_FAREFEATURES_HPP
2 #define __STDAIR_BOM_FAREFEATURES_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // StdAir
11 
12 // Forward declaration
13 namespace stdair {
14 
18  class FareFeatures : public BomAbstract {
19  template <typename BOM> friend class FacBom;
20  friend class FacBomManager;
21 
22  public:
23  // //////////// Type definitions //////////////
28 
29  public:
30  // /////////// Display support methods /////////
36  void toStream (std::ostream& ioOut) const {
37  ioOut << toString();
38  }
39 
45  void fromStream (std::istream& ioIn) {
46  }
47 
51  std::string toString() const;
52 
56  const std::string describeKey() const {
57  return _key.toString();
58  }
59 
60 
61  public:
62  // ////////// Getters ////////////
66  const Key_T& getKey() const {
67  return _key;
68  }
69 
73  BomAbstract* const getParent() const {
74  return _parent;
75  }
76 
80  const HolderMap_T& getHolderMap() const {
81  return _holderMap;
82  }
83 
87  const TripType_T& getTripType() const {
88  return _key.getTripType();
89  }
90 
95  return _key.getAdvancePurchase();
96  }
97 
102  return _key.getSaturdayStay();
103  }
104 
108  const ChangeFees_T& getChangeFees() const {
109  return _key.getChangeFees();
110  }
111 
116  return _key.getRefundableOption();
117  }
118 
122  const DayDuration_T& getMinimumStay() const {
123  return _key.getMinimumStay();
124  }
125 
126 
127  public:
128  // ////////////// Business methods ///////////////
133  bool isTripTypeValid (const TripType_T&) const;
134 
139  bool isStayDurationValid (const DayDuration_T&) const;
140 
145  bool isAdvancePurchaseValid (const DateTime_T& iBookingRequestDateTime,
146  const DateTime_T& iFlightDateTime) const;
147 
148 
149  protected:
150  // ////////// Constructors and destructors /////////
154  FareFeatures (const Key_T&);
158  virtual ~FareFeatures ();
159 
160  private:
164  FareFeatures ();
168  FareFeatures (const FareFeatures&);
169 
170  protected:
171  // ///////////// Attributes /////////////
176 
181 
186  };
187 
188 }
189 #endif // __STDAIR_BOM_FAREFEATURES_HPP
190