StdAir Logo  0.45.0
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:

List of all members.

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

class FacBom
class FacBomManager

Detailed Description

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


Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 27 of file FareFeatures.hpp.


Constructor & Destructor Documentation

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

Main constructor.

Definition at line 34 of file FareFeatures.cpp.

stdair::FareFeatures::~FareFeatures ( ) [protected, virtual]

Destructor.

Definition at line 39 of file FareFeatures.cpp.


Member Function Documentation

void stdair::FareFeatures::toStream ( std::ostream ioOut) const [inline, virtual]

Dump a Business Object into an output stream.

Parameters:
ostream&the output stream.

Implements stdair::BomAbstract.

Definition at line 36 of file FareFeatures.hpp.

References toString().

void stdair::FareFeatures::fromStream ( std::istream ioIn) [inline, virtual]

Read a Business Object from an input stream.

Parameters:
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 45 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 43 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 56 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 66 of file FareFeatures.hpp.

References _key.

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

Get a reference on the parent object instance.

Definition at line 73 of file FareFeatures.hpp.

References _parent.

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

Get a reference on the children holder.

Definition at line 80 of file FareFeatures.hpp.

References _holderMap.

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

Get the trip type.

Definition at line 87 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 94 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 101 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 108 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 115 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 122 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 51 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 76 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 89 of file FareFeatures.cpp.

References getAdvancePurchase().


Friends And Related Function Documentation

friend class FacBom [friend]

Definition at line 19 of file FareFeatures.hpp.

friend class FacBomManager [friend]

Definition at line 20 of file FareFeatures.hpp.


Member Data Documentation

Primary key (flight number and departure date).

Definition at line 175 of file FareFeatures.hpp.

Referenced by describeKey(), getKey(), getTripType(), getAdvancePurchase(), getSaturdayStay(), getChangeFees(), getRefundableOption(), and getMinimumStay().

Pointer on the parent class.

Definition at line 180 of file FareFeatures.hpp.

Referenced by getParent().

Map holding the children.

Definition at line 185 of file FareFeatures.hpp.

Referenced by getHolderMap().


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