StdAir Logo  1.00.15
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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
13namespace 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
110 return _key.getChangeFees();
111 }
112
117 return _key.getRefundableOption();
118 }
119
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
Handle on the StdAir library context.
boost::posix_time::ptime DateTime_T
std::string TripType_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Base class for the Business Object Model (BOM) layer.
Class representing the actual attributes for a fare date-period.
const SaturdayStay_T & getSaturdayStay() const
const ChangeFees_T & getChangeFees() const
const HolderMap_T & getHolderMap() const
const Key_T & getKey() const
void toStream(std::ostream &ioOut) const
FareFeaturesKey Key_T
BomAbstract *const getParent() const
std::string toString() const
bool isTripTypeValid(const TripType_T &) const
const std::string describeKey() const
bool isStayDurationValid(const DayDuration_T &) const
const NonRefundable_T & getRefundableOption() const
void fromStream(std::istream &ioIn)
bool isAdvancePurchaseValid(const DateTime_T &iBookingRequestDateTime, const DateTime_T &iFlightDateTime) const
const TripType_T & getTripType() const
const DayDuration_T & getMinimumStay() const
const DayDuration_T & getAdvancePurchase() const
Key of date-period.
const TripType_T & getTripType() const
const DayDuration_T & getMinimumStay() const
const ChangeFees_T & getChangeFees() const
const std::string toString() const
const SaturdayStay_T & getSaturdayStay() const
const DayDuration_T & getAdvancePurchase() const
const NonRefundable_T & getRefundableOption() const
Base class for Factory layer.
Definition FacBom.hpp:22
Utility class for linking StdAir-based objects.
Base class for Factory layer.