StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stdair::SegmentDate Class Reference

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

#include <stdair/bom/SegmentDate.hpp>

+ Inheritance diagram for stdair::SegmentDate:

List of all members.

Public Types

typedef SegmentDateKey Key_T

Public Member Functions

const Key_TgetKey () const
BomAbstract *const getParent () const
const AirportCode_TgetBoardingPoint () const
const AirportCode_TgetOffPoint () const
const HolderMap_TgetHolderMap () 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 DateOffset_T getDateOffset () const
const Duration_T getTimeOffset () const
SegmentDategetOperatingSegmentDate () const
const SegmentDateList_TgetMarketingSegmentDateList () const
const RoutingLegKeyList_TgetLegKeyList () const
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 &iElapsedTime)
void setDistance (const Distance_T &iDistance)
void addLegKey (const std::string &iLegKey)
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

 SegmentDate (const Key_T &)
virtual ~SegmentDate ()

Protected Attributes

Key_T _key
BomAbstract_parent
HolderMap_T _holderMap
SegmentDate_operatingSegmentDate
SegmentDateList_T _marketingSegmentDateList
Date_T _boardingDate
Duration_T _boardingTime
Date_T _offDate
Duration_T _offTime
Duration_T _elapsedTime
Distance_T _distance
RoutingLegKeyList_T _routingLegKeyList

Friends

class FacBom
class FacCloneBom
class FacBomManager
class boost::serialization::access

Detailed Description

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

Definition at line 36 of file SegmentDate.hpp.


Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 47 of file SegmentDate.hpp.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 38 of file SegmentDate.cpp.

stdair::SegmentDate::~SegmentDate ( )
protectedvirtual

Destructor.

Definition at line 44 of file SegmentDate.cpp.


Member Function Documentation

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

Get the segment-date key.

Definition at line 55 of file SegmentDate.hpp.

References _key.

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

Get the parent object.

Definition at line 62 of file SegmentDate.hpp.

References _parent.

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

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

Definition at line 69 of file SegmentDate.hpp.

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

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

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

Definition at line 76 of file SegmentDate.hpp.

References _key, and stdair::SegmentDateKey::getOffPoint().

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

Get the map of children holders.

Definition at line 83 of file SegmentDate.hpp.

References _holderMap.

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

Get the boarding date.

Definition at line 90 of file SegmentDate.hpp.

References _boardingDate.

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

Get the boarding time.

Definition at line 97 of file SegmentDate.hpp.

References _boardingTime.

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

Get the off date.

Definition at line 104 of file SegmentDate.hpp.

References _offDate.

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

Get the off time.

Definition at line 111 of file SegmentDate.hpp.

References _offTime.

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

Get the elapsed time.

Definition at line 118 of file SegmentDate.hpp.

References _elapsedTime.

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

Get the distance.

Definition at line 125 of file SegmentDate.hpp.

References _distance.

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

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

Definition at line 132 of file SegmentDate.hpp.

References _boardingDate, and _offDate.

Referenced by getTimeOffset().

const Duration_T stdair::SegmentDate::getTimeOffset ( ) const

Get the time offset between boarding and off points.

It is defined as being:

TimeOffset = (OffTime - BoardingTime) + (OffDate - BoardingDate) * 24

  • ElapsedTime.

Definition at line 55 of file SegmentDate.cpp.

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

SegmentDate* stdair::SegmentDate::getOperatingSegmentDate ( ) const
inline

Get the "operating" segment date.

Definition at line 149 of file SegmentDate.hpp.

References _operatingSegmentDate.

const SegmentDateList_T& stdair::SegmentDate::getMarketingSegmentDateList ( ) const
inline

Get the list of marketing segment dates.

Definition at line 156 of file SegmentDate.hpp.

References _marketingSegmentDateList.

const RoutingLegKeyList_T& stdair::SegmentDate::getLegKeyList ( ) const
inline

Get the list of routing leg keys.

Definition at line 163 of file SegmentDate.hpp.

References _routingLegKeyList.

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

Set the boarding date.

Definition at line 172 of file SegmentDate.hpp.

References _boardingDate.

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

Set the boarding time.

Definition at line 179 of file SegmentDate.hpp.

References _boardingTime.

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

Set the off date.

Definition at line 186 of file SegmentDate.hpp.

References _offDate.

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

Set the off time.

Definition at line 193 of file SegmentDate.hpp.

References _offTime.

void stdair::SegmentDate::setElapsedTime ( const Duration_T iElapsedTime)
inline

Set the elapsed time.

Definition at line 200 of file SegmentDate.hpp.

References _elapsedTime.

void stdair::SegmentDate::setDistance ( const Distance_T iDistance)
inline

Set the distance.

Definition at line 207 of file SegmentDate.hpp.

References _distance.

void stdair::SegmentDate::addLegKey ( const std::string &  iLegKey)
inline

Add a routing leg key to the list.

Definition at line 214 of file SegmentDate.hpp.

References _routingLegKeyList.

void stdair::SegmentDate::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 233 of file SegmentDate.hpp.

References toString().

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

Read a Business Object from an input stream.

Parameters:
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 242 of file SegmentDate.hpp.

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

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 48 of file SegmentDate.cpp.

References describeKey().

Referenced by toStream().

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

Get a string describing the key.

Definition at line 253 of file SegmentDate.hpp.

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

Referenced by stdair::SegmentCabin::getFullerKey(), stdair::BomRetriever::retrieveFullKeyFromSegmentDate(), and toString().

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

Serialisation.

Definition at line 208 of file CmdBomSerialiser.cpp.

References _key.


Friends And Related Function Documentation

friend class FacBom
friend

Definition at line 37 of file SegmentDate.hpp.

friend class FacCloneBom
friend

Definition at line 38 of file SegmentDate.hpp.

friend class FacBomManager
friend

Definition at line 39 of file SegmentDate.hpp.

friend class boost::serialization::access
friend

Definition at line 40 of file SegmentDate.hpp.


Member Data Documentation

Key_T stdair::SegmentDate::_key
protected

Primary key (origin and destination).

Definition at line 307 of file SegmentDate.hpp.

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

BomAbstract* stdair::SegmentDate::_parent
protected

Pointer on the parent class (FlightDate).

Definition at line 312 of file SegmentDate.hpp.

Referenced by getParent().

HolderMap_T stdair::SegmentDate::_holderMap
protected

Map holding the children (SegmentCabin objects).

Definition at line 317 of file SegmentDate.hpp.

Referenced by getHolderMap().

SegmentDate* stdair::SegmentDate::_operatingSegmentDate
protected

Pointer on the operating SegmentDate. Nota:

  1. "operating" refers to the codeshare contract seller.
  2. the pointer will be NULL if the segment date is itself the "operating" one.

Definition at line 325 of file SegmentDate.hpp.

Referenced by getOperatingSegmentDate().

SegmentDateList_T stdair::SegmentDate::_marketingSegmentDateList
protected

List holding the marketing segment dates. Nota:

  1. "marketing" refers to the codeshare contract seller.
  2. the list will be empty if the segment date is itself the "marketing" one.

Definition at line 333 of file SegmentDate.hpp.

Referenced by getMarketingSegmentDateList().

Date_T stdair::SegmentDate::_boardingDate
protected

Boarding date.

Definition at line 338 of file SegmentDate.hpp.

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

Duration_T stdair::SegmentDate::_boardingTime
protected

Boarding time.

Definition at line 343 of file SegmentDate.hpp.

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

Date_T stdair::SegmentDate::_offDate
protected

Landing date.

Definition at line 348 of file SegmentDate.hpp.

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

Duration_T stdair::SegmentDate::_offTime
protected

Landing time.

Definition at line 353 of file SegmentDate.hpp.

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

Duration_T stdair::SegmentDate::_elapsedTime
protected

Trip elapsed time.

Definition at line 358 of file SegmentDate.hpp.

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

Distance_T stdair::SegmentDate::_distance
protected

Trip distance.

Definition at line 363 of file SegmentDate.hpp.

Referenced by getDistance(), and setDistance().

RoutingLegKeyList_T stdair::SegmentDate::_routingLegKeyList
protected

List of routing leg keys.

Definition at line 368 of file SegmentDate.hpp.

Referenced by addLegKey(), and getLegKeyList().


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