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

Class representing the actual attributes for an airline flight-date. More...

#include <stdair/bom/OnDDate.hpp>

+ Inheritance diagram for stdair::OnDDate:

Public Types

typedef OnDDateKey Key_T
 

Public Member Functions

const Key_TgetKey () const
 
BomAbstract *const getParent () const
 
const AirlineCode_TgetAirlineCode () const
 
const stdair::Date_T getDate () const
 
const stdair::AirportCode_T getOrigin () const
 
const stdair::AirportCode_T getDestination () const
 
const HolderMap_TgetHolderMap () const
 
const StringDemandStructMap_TgetDemandInfoMap () const
 
const CabinForecastMap_TgetTotalForecastMap () const
 
const WTPDemandPair_TgetTotalForecast (const CabinCode_T &iCC) const
 
const CabinClassPairList_TgetCabinClassPairList (const std::string &iStr) const
 
const short getNbOfSegments () const
 
void setDemandInformation (const CabinClassPairList_T &, const YieldDemandPair_T &)
 
void setTotalForecast (const CabinCode_T &, const WTPDemandPair_T &)
 
void toStream (std::ostream &ioOut) const
 
void fromStream (std::istream &ioIn)
 
std::string toString () const
 
const std::string describeKey () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int iFileVersion)
 

Protected Member Functions

 OnDDate (const Key_T &)
 
virtual ~OnDDate ()
 

Protected Attributes

Key_T _key
 
BomAbstract_parent
 
HolderMap_T _holderMap
 
StringDemandStructMap_T _classPathDemandMap
 
StringCabinClassPairListMap_T _stringCabinClassPairListMap
 
CabinForecastMap_T _cabinForecastMap
 

Friends

template<typename BOM >
class FacBom
 
template<typename BOM >
class FacCloneBom
 
class FacBomManager
 
class boost::serialization::access
 

Detailed Description

Class representing the actual attributes for an airline flight-date.

Definition at line 33 of file OnDDate.hpp.

Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 44 of file OnDDate.hpp.

Constructor & Destructor Documentation

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

Main constructor.

Definition at line 28 of file OnDDate.cpp.

stdair::OnDDate::~OnDDate ( )
protectedvirtual

Destructor.

Definition at line 33 of file OnDDate.cpp.

Member Function Documentation

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

Get the O&D date key.

Definition at line 50 of file OnDDate.hpp.

References _key.

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

Get the parent object.

Definition at line 55 of file OnDDate.hpp.

References _parent.

Referenced by getAirlineCode().

const AirlineCode_T & stdair::OnDDate::getAirlineCode ( ) const

Get the airline code (key of the parent object).

Note
That method assumes that the parent object derives from the Inventory class, as it needs to have access to the getAirlineCode() method.

Definition at line 44 of file OnDDate.cpp.

References stdair::Inventory::getAirlineCode(), and getParent().

const stdair::Date_T stdair::OnDDate::getDate ( ) const
inline

Get the boarding date.

Definition at line 70 of file OnDDate.hpp.

References _key, and stdair::OnDDateKey::getDate().

const stdair::AirportCode_T stdair::OnDDate::getOrigin ( ) const
inline

Get the origin.

Definition at line 75 of file OnDDate.hpp.

References _key, and stdair::OnDDateKey::getOrigin().

const stdair::AirportCode_T stdair::OnDDate::getDestination ( ) const
inline

Get the destination.

Definition at line 80 of file OnDDate.hpp.

References _key, and stdair::OnDDateKey::getDestination().

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

Get the map of children holders.

Definition at line 87 of file OnDDate.hpp.

References _holderMap.

const StringDemandStructMap_T& stdair::OnDDate::getDemandInfoMap ( ) const
inline

Get the map of demand information.

Definition at line 94 of file OnDDate.hpp.

References _classPathDemandMap.

const CabinForecastMap_T& stdair::OnDDate::getTotalForecastMap ( ) const
inline

Get the map of total forecast.

Definition at line 101 of file OnDDate.hpp.

References _cabinForecastMap.

const WTPDemandPair_T& stdair::OnDDate::getTotalForecast ( const CabinCode_T iCC) const
inline

Get the total forecast for a given cabin.

Definition at line 108 of file OnDDate.hpp.

References _cabinForecastMap.

const CabinClassPairList_T& stdair::OnDDate::getCabinClassPairList ( const std::string &  iStr) const
inline

Get the cabin-class pair out of a string.

Definition at line 116 of file OnDDate.hpp.

References _stringCabinClassPairListMap.

const short stdair::OnDDate::getNbOfSegments ( ) const
inline

Get the number of segments of the O&D.

Definition at line 124 of file OnDDate.hpp.

References _key, and stdair::OnDDateKey::getNbOfSegments().

void stdair::OnDDate::setDemandInformation ( const CabinClassPairList_T iCabinClassPairList,
const YieldDemandPair_T iYieldDemandPair 
)

Set demand information.

Definition at line 53 of file OnDDate.cpp.

References _classPathDemandMap, and _stringCabinClassPairListMap.

void stdair::OnDDate::setTotalForecast ( const CabinCode_T iCabinCode,
const WTPDemandPair_T iWTPDemandPair 
)

Set forecast information per cabin.

Definition at line 76 of file OnDDate.cpp.

References _cabinForecastMap.

void stdair::OnDDate::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 147 of file OnDDate.hpp.

References toString().

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 156 of file OnDDate.hpp.

std::string stdair::OnDDate::toString ( ) const
virtual

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 37 of file OnDDate.cpp.

References describeKey().

Referenced by toStream().

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

Get a string describing the key.

Definition at line 167 of file OnDDate.hpp.

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

Referenced by toString().

template<class Archive >
void stdair::OnDDate::serialize ( Archive &  ar,
const unsigned int  iFileVersion 
)

Serialisation.

Friends And Related Function Documentation

template<typename BOM >
friend class FacBom
friend

Definition at line 34 of file OnDDate.hpp.

template<typename BOM >
friend class FacCloneBom
friend

Definition at line 35 of file OnDDate.hpp.

friend class FacBomManager
friend

Definition at line 36 of file OnDDate.hpp.

friend class boost::serialization::access
friend

Definition at line 37 of file OnDDate.hpp.

Member Data Documentation

Key_T stdair::OnDDate::_key
protected

Primary key (list of OnD string keys).

Definition at line 217 of file OnDDate.hpp.

Referenced by describeKey(), getDate(), getDestination(), getKey(), getNbOfSegments(), and getOrigin().

BomAbstract* stdair::OnDDate::_parent
protected

Pointer on the parent class (Inventory).

Definition at line 222 of file OnDDate.hpp.

Referenced by getParent().

HolderMap_T stdair::OnDDate::_holderMap
protected

Map holding the children (SegmentDate and LegDate objects).

Definition at line 227 of file OnDDate.hpp.

Referenced by getHolderMap().

StringDemandStructMap_T stdair::OnDDate::_classPathDemandMap
protected

O&D demand information.

Definition at line 232 of file OnDDate.hpp.

Referenced by getDemandInfoMap(), and setDemandInformation().

StringCabinClassPairListMap_T stdair::OnDDate::_stringCabinClassPairListMap
protected

O&D cabin and associated class map.

Definition at line 237 of file OnDDate.hpp.

Referenced by getCabinClassPairList(), and setDemandInformation().

CabinForecastMap_T stdair::OnDDate::_cabinForecastMap
protected

O&D demand total forecast.

Definition at line 242 of file OnDDate.hpp.

Referenced by getTotalForecast(), getTotalForecastMap(), and setTotalForecast().


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