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

#include <stdair/bom/LegDate.hpp>

+ Inheritance diagram for stdair::LegDate:

Public Types

typedef LegDateKey Key_T
 

Public Member Functions

const Key_TgetKey () const
 
BomAbstract *const getParent () const
 
const AirportCode_TgetBoardingPoint () const
 
const AirlineCode_TgetAirlineCode () const
 
const HolderMap_TgetHolderMap () const
 
LegCabingetLegCabin (const std::string &iLegCabinKeyStr) const
 
LegCabingetLegCabin (const LegCabinKey &) const
 
const AirportCode_TgetOffPoint () const
 
const Date_TgetBoardingDate () const
 
const Duration_TgetBoardingTime () const
 
const Date_TgetOffDate () const
 
const Duration_TgetOffTime () const
 
const Duration_TgetElapsedTime () const
 
const Distance_TgetDistance () const
 
const CabinCapacity_TgetCapacity () const
 
const DateOffset_T getDateOffset () const
 
const Duration_T getTimeOffset () const
 
void setOffPoint (const AirportCode_T &iOffPoint)
 
void setBoardingDate (const Date_T &iBoardingDate)
 
void setBoardingTime (const Duration_T &iBoardingTime)
 
void setOffDate (const Date_T &iOffDate)
 
void setOffTime (const Duration_T &iOffTime)
 
void setElapsedTime (const Duration_T &)
 
void setOperatingAirlineCode (const AirlineCode_T &iAirlineCode)
 
void setOperatingFlightNumber (const FlightNumber_T &iFlightNumber)
 
void toStream (std::ostream &ioOut) const
 
void fromStream (std::istream &ioIn)
 
std::string toString () const
 
const std::string describeKey () const
 
const std::string describeRoutingKey () const
 

Protected Member Functions

 LegDate (const Key_T &)
 
virtual ~LegDate ()
 

Protected Attributes

Key_T _key
 
BomAbstract_parent
 
HolderMap_T _holderMap
 
AirportCode_T _offPoint
 
Date_T _boardingDate
 
Duration_T _boardingTime
 
Date_T _offDate
 
Duration_T _offTime
 
Duration_T _elapsedTime
 
Distance_T _distance
 
CabinCapacity_T _capacity
 
AirlineCode_T _operatingAirlineCode
 
FlightNumber_T _operatingFlightNumber
 

Friends

template<typename BOM >
class FacBom
 
template<typename BOM >
class FacCloneBom
 
class FacBomManager
 

Detailed Description

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

Definition at line 25 of file LegDate.hpp.

Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 33 of file LegDate.hpp.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 38 of file LegDate.cpp.

stdair::LegDate::~LegDate ( )
protectedvirtual

Destructor.

Definition at line 44 of file LegDate.cpp.

Member Function Documentation

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

Get the leg-date key.

Definition at line 39 of file LegDate.hpp.

References _key.

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

Get the parent object.

Definition at line 44 of file LegDate.hpp.

References _parent.

Referenced by describeRoutingKey(), and getAirlineCode().

const AirportCode_T& stdair::LegDate::getBoardingPoint ( ) const
inline

Get the boarding point (part of the primary key).

Definition at line 49 of file LegDate.hpp.

References _key, and stdair::LegDateKey::getBoardingPoint().

const AirlineCode_T & stdair::LegDate::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 48 of file LegDate.cpp.

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

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

Get the map of children holders.

Definition at line 65 of file LegDate.hpp.

References _holderMap.

LegCabin * stdair::LegDate::getLegCabin ( const std::string &  iLegCabinKeyStr) const

Get a pointer on the LegCabin object corresponding to the given key.

Note
The LegCabin object can be inherited from, if needed. In that case, a dynamic_cast<> may be needed.
Parameters
conststd::string& The leg-cabin key.
Returns
LegCabin* Found LegCabin object. NULL if not found.

Definition at line 76 of file LegDate.cpp.

Referenced by getLegCabin(), and stdair::BomRetriever::retrieveDummyLegCabin().

LegCabin * stdair::LegDate::getLegCabin ( const LegCabinKey iLegCabinKey) const

Get a pointer on the LegCabin object corresponding to the given key.

Note
The LegCabin object can be inherited from, if needed. In that case, a dynamic_cast<> may be needed.
Parameters
constLegCabinKey& The leg-cabin key
Returns
LegCabin* Found LegCabin object. NULL if not found.

Definition at line 83 of file LegDate.cpp.

References getLegCabin(), and stdair::LegCabinKey::toString().

const AirportCode_T& stdair::LegDate::getOffPoint ( ) const
inline

Get the off point.

Definition at line 94 of file LegDate.hpp.

References _offPoint.

const Date_T& stdair::LegDate::getBoardingDate ( ) const
inline

Get the boarding date.

Definition at line 99 of file LegDate.hpp.

References _boardingDate.

const Duration_T& stdair::LegDate::getBoardingTime ( ) const
inline

Get the boarding time.

Definition at line 104 of file LegDate.hpp.

References _boardingTime.

const Date_T& stdair::LegDate::getOffDate ( ) const
inline

Get the off date.

Definition at line 109 of file LegDate.hpp.

References _offDate.

const Duration_T& stdair::LegDate::getOffTime ( ) const
inline

Get the off time.

Definition at line 114 of file LegDate.hpp.

References _offTime.

const Duration_T& stdair::LegDate::getElapsedTime ( ) const
inline

Get the elapsed time.

Definition at line 119 of file LegDate.hpp.

References _elapsedTime.

const Distance_T& stdair::LegDate::getDistance ( ) const
inline

Get the distance.

Definition at line 124 of file LegDate.hpp.

References _distance.

const CabinCapacity_T& stdair::LegDate::getCapacity ( ) const
inline

Get the leg capacity.

Definition at line 129 of file LegDate.hpp.

References _capacity.

const DateOffset_T stdair::LegDate::getDateOffset ( ) const
inline

Get the date offset (off date - boarding date).

Definition at line 134 of file LegDate.hpp.

References _boardingDate, and _offDate.

Referenced by getTimeOffset().

const Duration_T stdair::LegDate::getTimeOffset ( ) const

Get the time off set between boarding and off points.
It is defined as being: TimeOffset = (OffTime - BoardingTime) + (OffDate - BoardingDate) * 24

  • ElapsedTime.

Definition at line 88 of file LegDate.cpp.

References _boardingTime, _elapsedTime, _offTime, and getDateOffset().

void stdair::LegDate::setOffPoint ( const AirportCode_T iOffPoint)
inline

Set the off point.

Definition at line 148 of file LegDate.hpp.

References _offPoint.

void stdair::LegDate::setBoardingDate ( const Date_T iBoardingDate)
inline

Set the boarding date.

Definition at line 153 of file LegDate.hpp.

References _boardingDate.

void stdair::LegDate::setBoardingTime ( const Duration_T iBoardingTime)
inline

Set the boarding time.

Definition at line 158 of file LegDate.hpp.

References _boardingTime.

void stdair::LegDate::setOffDate ( const Date_T iOffDate)
inline

Set the off date.

Definition at line 163 of file LegDate.hpp.

References _offDate.

void stdair::LegDate::setOffTime ( const Duration_T iOffTime)
inline

Set the off time.

Definition at line 168 of file LegDate.hpp.

References _offTime.

void stdair::LegDate::setElapsedTime ( const Duration_T iElapsedTime)

Set the elapsed time.

Definition at line 103 of file LegDate.cpp.

References _elapsedTime.

void stdair::LegDate::setOperatingAirlineCode ( const AirlineCode_T iAirlineCode)
inline

Set the operating airline code.

Definition at line 176 of file LegDate.hpp.

References _operatingAirlineCode.

void stdair::LegDate::setOperatingFlightNumber ( const FlightNumber_T iFlightNumber)
inline

Set the operating flight number.

Definition at line 181 of file LegDate.hpp.

References _operatingFlightNumber.

void stdair::LegDate::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 194 of file LegDate.hpp.

References toString().

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 200 of file LegDate.hpp.

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

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 56 of file LegDate.cpp.

References describeKey().

Referenced by toStream().

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

Get a string describing the key.

Definition at line 207 of file LegDate.hpp.

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

Referenced by describeRoutingKey(), stdair::LegCabin::getFullerKey(), and toString().

const std::string stdair::LegDate::describeRoutingKey ( ) const

Friends And Related Function Documentation

template<typename BOM >
friend class FacBom
friend

Definition at line 26 of file LegDate.hpp.

template<typename BOM >
friend class FacCloneBom
friend

Definition at line 27 of file LegDate.hpp.

friend class FacBomManager
friend

Definition at line 28 of file LegDate.hpp.

Member Data Documentation

Key_T stdair::LegDate::_key
protected

Primary key (origin airport).

Definition at line 231 of file LegDate.hpp.

Referenced by describeKey(), getBoardingPoint(), and getKey().

BomAbstract* stdair::LegDate::_parent
protected

Pointer on the parent class (FlightDate).

Definition at line 234 of file LegDate.hpp.

Referenced by getParent().

HolderMap_T stdair::LegDate::_holderMap
protected

Map holding the children (LegCabin objects).

Definition at line 237 of file LegDate.hpp.

Referenced by getHolderMap().

AirportCode_T stdair::LegDate::_offPoint
protected

Landing airport.

Definition at line 240 of file LegDate.hpp.

Referenced by getOffPoint(), and setOffPoint().

Date_T stdair::LegDate::_boardingDate
protected

Boarding date.

Definition at line 243 of file LegDate.hpp.

Referenced by getBoardingDate(), getDateOffset(), and setBoardingDate().

Duration_T stdair::LegDate::_boardingTime
protected

Boarding time.

Definition at line 246 of file LegDate.hpp.

Referenced by getBoardingTime(), getTimeOffset(), and setBoardingTime().

Date_T stdair::LegDate::_offDate
protected

Landing date.

Definition at line 249 of file LegDate.hpp.

Referenced by getDateOffset(), getOffDate(), and setOffDate().

Duration_T stdair::LegDate::_offTime
protected

Landing time.

Definition at line 252 of file LegDate.hpp.

Referenced by getOffTime(), getTimeOffset(), and setOffTime().

Duration_T stdair::LegDate::_elapsedTime
protected

Trip elapsed time.

Definition at line 255 of file LegDate.hpp.

Referenced by getElapsedTime(), getTimeOffset(), and setElapsedTime().

Distance_T stdair::LegDate::_distance
protected

Trip distance.

Definition at line 258 of file LegDate.hpp.

Referenced by getDistance().

CabinCapacity_T stdair::LegDate::_capacity
protected

Aggregated capacity for all the leg-cabins.

Definition at line 261 of file LegDate.hpp.

Referenced by getCapacity().

AirlineCode_T stdair::LegDate::_operatingAirlineCode
protected

Operating airline code.

Definition at line 264 of file LegDate.hpp.

Referenced by describeRoutingKey(), and setOperatingAirlineCode().

FlightNumber_T stdair::LegDate::_operatingFlightNumber
protected

Operating flight number.

Definition at line 267 of file LegDate.hpp.

Referenced by describeRoutingKey(), and setOperatingFlightNumber().


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