Class representing the actual attributes for a fare date-period. More...
#include <stdair/bom/FareFeatures.hpp>
Public Types | |
typedef FareFeaturesKey | Key_T |
Public Member Functions | |
void | toStream (std::ostream &ioOut) const |
void | fromStream (std::istream &ioIn) |
std::string | toString () const |
const std::string | describeKey () const |
const Key_T & | getKey () const |
BomAbstract *const | getParent () const |
const HolderMap_T & | getHolderMap () const |
const TripType_T & | getTripType () const |
const DayDuration_T & | getAdvancePurchase () const |
const SaturdayStay_T & | getSaturdayStay () const |
const ChangeFees_T & | getChangeFees () const |
const NonRefundable_T & | getRefundableOption () const |
const DayDuration_T & | getMinimumStay () const |
bool | isTripTypeValid (const TripType_T &) const |
bool | isStayDurationValid (const DayDuration_T &) const |
bool | isAdvancePurchaseValid (const DateTime_T &iBookingRequestDateTime, const DateTime_T &iFlightDateTime) const |
Protected Member Functions | |
FareFeatures (const Key_T &) | |
virtual | ~FareFeatures () |
Protected Attributes | |
Key_T | _key |
BomAbstract * | _parent |
HolderMap_T | _holderMap |
Friends | |
template<typename BOM > | |
class | FacBom |
template<typename BOM > | |
class | FacCloneBom |
class | FacBomManager |
Class representing the actual attributes for a fare date-period.
Definition at line 18 of file FareFeatures.hpp.
Definition allowing to retrieve the associated BOM key type.
Definition at line 28 of file FareFeatures.hpp.
|
protected |
Main constructor.
Definition at line 33 of file FareFeatures.cpp.
|
protectedvirtual |
Destructor.
Definition at line 38 of file FareFeatures.cpp.
|
inlinevirtual |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Implements stdair::BomAbstract.
Definition at line 37 of file FareFeatures.hpp.
References toString().
|
inlinevirtual |
Read a Business Object from an input stream.
istream& | the input stream. |
Implements stdair::BomAbstract.
Definition at line 46 of file FareFeatures.hpp.
|
virtual |
Get the serialised version of the Business Object.
Implements stdair::BomAbstract.
Definition at line 42 of file FareFeatures.cpp.
References describeKey().
Referenced by toStream().
|
inline |
Get a string describing the key.
Definition at line 57 of file FareFeatures.hpp.
References _key, and stdair::FareFeaturesKey::toString().
Referenced by toString().
|
inline |
Get the primary key (trip type, advance purchase,... ,cabin code).
Definition at line 67 of file FareFeatures.hpp.
References _key.
|
inline |
Get a reference on the parent object instance.
Definition at line 74 of file FareFeatures.hpp.
References _parent.
|
inline |
Get a reference on the children holder.
Definition at line 81 of file FareFeatures.hpp.
References _holderMap.
|
inline |
Get the trip type.
Definition at line 88 of file FareFeatures.hpp.
References _key, and stdair::FareFeaturesKey::getTripType().
Referenced by isTripTypeValid().
|
inline |
Get the fare day duration.
Definition at line 95 of file FareFeatures.hpp.
References _key, and stdair::FareFeaturesKey::getAdvancePurchase().
Referenced by isAdvancePurchaseValid().
|
inline |
Get the fare saturday stay option.
Definition at line 102 of file FareFeatures.hpp.
References _key, and stdair::FareFeaturesKey::getSaturdayStay().
|
inline |
Get the change fees criterion.
Definition at line 109 of file FareFeatures.hpp.
References _key, and stdair::FareFeaturesKey::getChangeFees().
|
inline |
Get the refundable option.
Definition at line 116 of file FareFeatures.hpp.
References _key, and stdair::FareFeaturesKey::getRefundableOption().
|
inline |
Get the minimum stay.
Definition at line 123 of file FareFeatures.hpp.
References _key, and stdair::FareFeaturesKey::getMinimumStay().
Referenced by isStayDurationValid().
bool stdair::FareFeatures::isTripTypeValid | ( | const TripType_T & | iBookingRequestTripType | ) | const |
Check whether the fare rule trip type corresponds to the booking request trip type.
Definition at line 50 of file FareFeatures.cpp.
References getTripType(), stdair::TRIP_TYPE_INBOUND, stdair::TRIP_TYPE_OUTBOUND, and stdair::TRIP_TYPE_ROUND_TRIP.
bool stdair::FareFeatures::isStayDurationValid | ( | const DayDuration_T & | iStayDuration | ) | const |
Check whether a given stay duration is greater or equal to the minimum stay of the fare rule.
Definition at line 75 of file FareFeatures.cpp.
References getMinimumStay().
bool stdair::FareFeatures::isAdvancePurchaseValid | ( | const DateTime_T & | iBookingRequestDateTime, |
const DateTime_T & | iFlightDateTime | ||
) | const |
Check whether a booking request date is valid compared the required advance purchase number of days of the fare rule.
Definition at line 88 of file FareFeatures.cpp.
References getAdvancePurchase().
|
friend |
Definition at line 19 of file FareFeatures.hpp.
|
friend |
Definition at line 20 of file FareFeatures.hpp.
|
friend |
Definition at line 21 of file FareFeatures.hpp.
|
protected |
Primary key (flight number and departure date).
Definition at line 176 of file FareFeatures.hpp.
Referenced by describeKey(), getAdvancePurchase(), getChangeFees(), getKey(), getMinimumStay(), getRefundableOption(), getSaturdayStay(), and getTripType().
|
protected |
Pointer on the parent class.
Definition at line 181 of file FareFeatures.hpp.
Referenced by getParent().
|
protected |
Map holding the children.
Definition at line 186 of file FareFeatures.hpp.
Referenced by getHolderMap().