StdAir Logo  1.00.20
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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

◆ Key_T

Definition allowing to retrieve the associated BOM key type.

Definition at line 28 of file FareFeatures.hpp.

Constructor & Destructor Documentation

◆ FareFeatures()

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

Main constructor.

Definition at line 33 of file FareFeatures.cpp.

References _key, _parent, and FareFeatures().

Referenced by FareFeatures().

◆ ~FareFeatures()

stdair::FareFeatures::~FareFeatures ( )
protectedvirtual

Destructor.

Definition at line 38 of file FareFeatures.cpp.

Member Function Documentation

◆ toStream()

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().

◆ fromStream()

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.

◆ toString()

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().

◆ describeKey()

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

Get a string describing the key.

Definition at line 57 of file FareFeatures.hpp.

References _key.

Referenced by toString().

◆ getKey()

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.

◆ getParent()

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, and stdair::BomAbstract::BomAbstract().

◆ getHolderMap()

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.

◆ getTripType()

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

Get the trip type.

Definition at line 88 of file FareFeatures.hpp.

References _key.

Referenced by isTripTypeValid().

◆ getAdvancePurchase()

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

Get the fare day duration.

Definition at line 95 of file FareFeatures.hpp.

References _key.

Referenced by isAdvancePurchaseValid().

◆ getSaturdayStay()

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

Get the fare saturday stay option.

Definition at line 102 of file FareFeatures.hpp.

References _key.

◆ getChangeFees()

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

Get the change fees criterion.

Definition at line 109 of file FareFeatures.hpp.

References _key.

◆ getRefundableOption()

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

Get the refundable option.

Definition at line 116 of file FareFeatures.hpp.

References _key.

◆ getMinimumStay()

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

Get the minimum stay.

Definition at line 123 of file FareFeatures.hpp.

References _key.

Referenced by isStayDurationValid().

◆ isTripTypeValid()

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 49 of file FareFeatures.cpp.

References getTripType(), stdair::TRIP_TYPE_INBOUND, stdair::TRIP_TYPE_OUTBOUND, and stdair::TRIP_TYPE_ROUND_TRIP.

◆ isStayDurationValid()

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 74 of file FareFeatures.cpp.

References getMinimumStay().

◆ isAdvancePurchaseValid()

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 87 of file FareFeatures.cpp.

References getAdvancePurchase().

Friends And Related Symbol Documentation

◆ FacBom

template<typename BOM>
friend class FacBom
friend

Definition at line 19 of file FareFeatures.hpp.

References FacBom.

Referenced by FacBom.

◆ FacCloneBom

template<typename BOM>
friend class FacCloneBom
friend

Definition at line 20 of file FareFeatures.hpp.

References FacCloneBom.

Referenced by FacCloneBom.

◆ FacBomManager

friend class FacBomManager
friend

Definition at line 21 of file FareFeatures.hpp.

References FacBomManager.

Referenced by FacBomManager.

Member Data Documentation

◆ _key

Key_T stdair::FareFeatures::_key
protected

Primary key (flight number and departure date).

Definition at line 176 of file FareFeatures.hpp.

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

◆ _parent

BomAbstract* stdair::FareFeatures::_parent
protected

Pointer on the parent class.

Definition at line 181 of file FareFeatures.hpp.

Referenced by FareFeatures(), and getParent().

◆ _holderMap

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: