StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  template <typename BOM> friend class FacCloneBom;
21  friend class FacBomManager;
22 
23  public:
24  // //////////// Type definitions //////////////
29 
30  public:
31  // /////////// Display support methods /////////
37  void toStream (std::ostream& ioOut) const {
38  ioOut << toString();
39  }
40 
46  void fromStream (std::istream& ioIn) {
47  }
48 
52  std::string toString() const;
53 
57  const std::string describeKey() const {
58  return _key.toString();
59  }
60 
61 
62  public:
63  // ////////// Getters ////////////
67  const Key_T& getKey() const {
68  return _key;
69  }
70 
74  BomAbstract* const getParent() const {
75  return _parent;
76  }
77 
81  const HolderMap_T& getHolderMap() const {
82  return _holderMap;
83  }
84 
88  const TripType_T& getTripType() const {
89  return _key.getTripType();
90  }
91 
96  return _key.getAdvancePurchase();
97  }
98 
103  return _key.getSaturdayStay();
104  }
105 
109  const ChangeFees_T& getChangeFees() const {
110  return _key.getChangeFees();
111  }
112 
117  return _key.getRefundableOption();
118  }
119 
123  const DayDuration_T& getMinimumStay() const {
124  return _key.getMinimumStay();
125  }
126 
127 
128  public:
129  // ////////////// Business methods ///////////////
134  bool isTripTypeValid (const TripType_T&) const;
135 
140  bool isStayDurationValid (const DayDuration_T&) const;
141 
146  bool isAdvancePurchaseValid (const DateTime_T& iBookingRequestDateTime,
147  const DateTime_T& iFlightDateTime) const;
148 
149 
150  protected:
151  // ////////// Constructors and destructors /////////
155  FareFeatures (const Key_T&);
159  virtual ~FareFeatures ();
160 
161  private:
165  FareFeatures ();
169  FareFeatures (const FareFeatures&);
170 
171  protected:
172  // ///////////// Attributes /////////////
177 
182 
187  };
188 
189 }
190 #endif // __STDAIR_BOM_FAREFEATURES_HPP
191