StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 toStream (std::ostream &ioOut) const
void fromStream (std::istream &ioIn)
std::string toString () const
const std::string describeKey () 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

Friends

class FacBom
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 32 of file LegDate.hpp.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 28 of file LegDate.cpp.

stdair::LegDate::~LegDate ( )
protectedvirtual

Destructor.

Definition at line 34 of file LegDate.cpp.

Member Function Documentation

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

Get the leg-date key.

Definition at line 38 of file LegDate.hpp.

References _key.

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

Get the parent object.

Definition at line 43 of file LegDate.hpp.

References _parent.

Referenced by getAirlineCode().

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

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

Definition at line 48 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 38 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 64 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 53 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 60 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 93 of file LegDate.hpp.

References _offPoint.

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

Get the boarding date.

Definition at line 98 of file LegDate.hpp.

References _boardingDate.

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

Get the boarding time.

Definition at line 103 of file LegDate.hpp.

References _boardingTime.

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

Get the off date.

Definition at line 108 of file LegDate.hpp.

References _offDate.

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

Get the off time.

Definition at line 113 of file LegDate.hpp.

References _offTime.

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

Get the elapsed time.

Definition at line 118 of file LegDate.hpp.

References _elapsedTime.

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

Get the distance.

Definition at line 123 of file LegDate.hpp.

References _distance.

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

Get the leg capacity.

Definition at line 128 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 133 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 65 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 147 of file LegDate.hpp.

References _offPoint.

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

Set the boarding date.

Definition at line 152 of file LegDate.hpp.

References _boardingDate.

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

Set the boarding time.

Definition at line 157 of file LegDate.hpp.

References _boardingTime.

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

Set the off date.

Definition at line 162 of file LegDate.hpp.

References _offDate.

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

Set the off time.

Definition at line 167 of file LegDate.hpp.

References _offTime.

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

Set the elapsed time.

Definition at line 80 of file LegDate.cpp.

References _elapsedTime.

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 183 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 189 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 46 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 196 of file LegDate.hpp.

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

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

Friends And Related Function Documentation

friend class FacBom
friend

Definition at line 26 of file LegDate.hpp.

friend class FacBomManager
friend

Definition at line 27 of file LegDate.hpp.

Member Data Documentation

Key_T stdair::LegDate::_key
protected

Primary key (origin airport).

Definition at line 218 of file LegDate.hpp.

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

BomAbstract* stdair::LegDate::_parent
protected

Pointer on the parent class (FlightDate).

Definition at line 221 of file LegDate.hpp.

Referenced by getParent().

HolderMap_T stdair::LegDate::_holderMap
protected

Map holding the children (LegCabin objects).

Definition at line 224 of file LegDate.hpp.

Referenced by getHolderMap().

AirportCode_T stdair::LegDate::_offPoint
protected

Landing airport.

Definition at line 227 of file LegDate.hpp.

Referenced by getOffPoint(), and setOffPoint().

Date_T stdair::LegDate::_boardingDate
protected

Boarding date.

Definition at line 230 of file LegDate.hpp.

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

Duration_T stdair::LegDate::_boardingTime
protected

Boarding time.

Definition at line 233 of file LegDate.hpp.

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

Date_T stdair::LegDate::_offDate
protected

Landing date.

Definition at line 236 of file LegDate.hpp.

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

Duration_T stdair::LegDate::_offTime
protected

Landing time.

Definition at line 239 of file LegDate.hpp.

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

Duration_T stdair::LegDate::_elapsedTime
protected

Trip elapsed time.

Definition at line 242 of file LegDate.hpp.

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

Distance_T stdair::LegDate::_distance
protected

Trip distance.

Definition at line 245 of file LegDate.hpp.

Referenced by getDistance().

CabinCapacity_T stdair::LegDate::_capacity
protected

Aggregated capacity for all the leg-cabins.

Definition at line 248 of file LegDate.hpp.

Referenced by getCapacity().


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