StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
stdair::FareFeatures Class Reference

Class representing the actual attributes for a fare date-period. More...

#include <stdair/bom/FareFeatures.hpp>

+ Inheritance diagram for stdair::FareFeatures:

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_TgetKey () const
 
BomAbstract *const getParent () const
 
const HolderMap_TgetHolderMap () const
 
const TripType_TgetTripType () const
 
const DayDuration_TgetAdvancePurchase () const
 
const SaturdayStay_TgetSaturdayStay () const
 
const ChangeFees_TgetChangeFees () const
 
const NonRefundable_TgetRefundableOption () const
 
const DayDuration_TgetMinimumStay () 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
 

Detailed Description

Class representing the actual attributes for a fare date-period.

Definition at line 18 of file FareFeatures.hpp.

Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 28 of file FareFeatures.hpp.

Constructor & Destructor Documentation

stdair::FareFeatures::FareFeatures ( const Key_T iKey)
protected

Main constructor.

Definition at line 33 of file FareFeatures.cpp.

stdair::FareFeatures::~FareFeatures ( )
protectedvirtual

Destructor.

Definition at line 38 of file FareFeatures.cpp.

Member Function Documentation

void stdair::FareFeatures::toStream ( std::ostream &  ioOut) const
inlinevirtual

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Implements stdair::BomAbstract.

Definition at line 37 of file FareFeatures.hpp.

References toString().

void stdair::FareFeatures::fromStream ( std::istream &  ioIn)
inlinevirtual

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 46 of file FareFeatures.hpp.

std::string stdair::FareFeatures::toString ( ) const
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().

const std::string stdair::FareFeatures::describeKey ( ) const
inline

Get a string describing the key.

Definition at line 57 of file FareFeatures.hpp.

References _key, and stdair::FareFeaturesKey::toString().

Referenced by toString().

const Key_T& stdair::FareFeatures::getKey ( ) const
inline

Get the primary key (trip type, advance purchase,... ,cabin code).

Definition at line 67 of file FareFeatures.hpp.

References _key.

BomAbstract* const stdair::FareFeatures::getParent ( ) const
inline

Get a reference on the parent object instance.

Definition at line 74 of file FareFeatures.hpp.

References _parent.

const HolderMap_T& stdair::FareFeatures::getHolderMap ( ) const
inline

Get a reference on the children holder.

Definition at line 81 of file FareFeatures.hpp.

References _holderMap.

const TripType_T& stdair::FareFeatures::getTripType ( ) const
inline

Get the trip type.

Definition at line 88 of file FareFeatures.hpp.

References _key, and stdair::FareFeaturesKey::getTripType().

Referenced by isTripTypeValid().

const DayDuration_T& stdair::FareFeatures::getAdvancePurchase ( ) const
inline

Get the fare day duration.

Definition at line 95 of file FareFeatures.hpp.

References _key, and stdair::FareFeaturesKey::getAdvancePurchase().

Referenced by isAdvancePurchaseValid().

const SaturdayStay_T& stdair::FareFeatures::getSaturdayStay ( ) const
inline

Get the fare saturday stay option.

Definition at line 102 of file FareFeatures.hpp.

References _key, and stdair::FareFeaturesKey::getSaturdayStay().

const ChangeFees_T& stdair::FareFeatures::getChangeFees ( ) const
inline

Get the change fees criterion.

Definition at line 109 of file FareFeatures.hpp.

References _key, and stdair::FareFeaturesKey::getChangeFees().

const NonRefundable_T& stdair::FareFeatures::getRefundableOption ( ) const
inline

Get the refundable option.

Definition at line 116 of file FareFeatures.hpp.

References _key, and stdair::FareFeaturesKey::getRefundableOption().

const DayDuration_T& stdair::FareFeatures::getMinimumStay ( ) const
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().

Friends And Related Function Documentation

template<typename BOM >
friend class FacBom
friend

Definition at line 19 of file FareFeatures.hpp.

template<typename BOM >
friend class FacCloneBom
friend

Definition at line 20 of file FareFeatures.hpp.

friend class FacBomManager
friend

Definition at line 21 of file FareFeatures.hpp.

Member Data Documentation

Key_T stdair::FareFeatures::_key
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().

BomAbstract* stdair::FareFeatures::_parent
protected

Pointer on the parent class.

Definition at line 181 of file FareFeatures.hpp.

Referenced by getParent().

HolderMap_T stdair::FareFeatures::_holderMap
protected

Map holding the children.

Definition at line 186 of file FareFeatures.hpp.

Referenced by getHolderMap().


The documentation for this class was generated from the following files: