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

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

#include <stdair/bom/FlightDate.hpp>

+ Inheritance diagram for stdair::FlightDate:

Public Types

typedef FlightDateKey Key_T
 

Public Member Functions

const Key_TgetKey () const
 
BomAbstract *const getParent () const
 
const FlightNumber_TgetFlightNumber () const
 
const Date_TgetDepartureDate () const
 
const AirlineCode_TgetAirlineCode () const
 
const HolderMap_TgetHolderMap () const
 
LegDategetLegDate (const std::string &iLegDateKeyStr) const
 
LegDategetLegDate (const LegDateKey &) const
 
SegmentDategetSegmentDate (const std::string &iSegmentDateKeyStr) const
 
SegmentDategetSegmentDate (const SegmentDateKey &) const
 
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

 FlightDate (const Key_T &)
 
virtual ~FlightDate ()
 

Protected Attributes

Key_T _key
 
BomAbstract_parent
 
HolderMap_T _holderMap
 

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 35 of file FlightDate.hpp.

Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 46 of file FlightDate.hpp.

Constructor & Destructor Documentation

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

Main constructor.

Definition at line 29 of file FlightDate.cpp.

stdair::FlightDate::~FlightDate ( )
protectedvirtual

Destructor.

Definition at line 33 of file FlightDate.cpp.

Member Function Documentation

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

Get the flight-date key.

Definition at line 52 of file FlightDate.hpp.

References _key.

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

Get the parent object.

Definition at line 57 of file FlightDate.hpp.

References _parent.

Referenced by getAirlineCode().

const FlightNumber_T& stdair::FlightDate::getFlightNumber ( ) const
inline

Get the flight number (part of the primary key).

Definition at line 62 of file FlightDate.hpp.

References _key, and stdair::FlightDateKey::getFlightNumber().

Referenced by stdair::BomJSONExport::jsonExportFlightDateList(), and stdair::BomJSONExport::jsonExportFlightDateObjects().

const Date_T& stdair::FlightDate::getDepartureDate ( ) const
inline
const AirlineCode_T & stdair::FlightDate::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 37 of file FlightDate.cpp.

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

Referenced by stdair::LegDate::getAirlineCode(), and stdair::BomJSONExport::jsonExportFlightDateObjects().

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

Get the map of children holders.

Definition at line 83 of file FlightDate.hpp.

References _holderMap.

LegDate * stdair::FlightDate::getLegDate ( const std::string &  iLegDateKeyStr) const

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

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

Definition at line 52 of file FlightDate.cpp.

Referenced by getLegDate(), stdair::BomRetriever::retrieveDummyLegCabin(), and stdair::BomRetriever::retrieveOperatingLegDateFromLongKey().

LegDate * stdair::FlightDate::getLegDate ( const LegDateKey iLegDateKey) const

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

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

Definition at line 59 of file FlightDate.cpp.

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

SegmentDate * stdair::FlightDate::getSegmentDate ( const std::string &  iSegmentDateKeyStr) const

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

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

Definition at line 65 of file FlightDate.cpp.

Referenced by getSegmentDate(), stdair::BomRetriever::retrieveDummySegmentCabin(), stdair::BomRetriever::retrieveSegmentDateFromKey(), and stdair::BomRetriever::retrieveSegmentDateFromLongKey().

SegmentDate * stdair::FlightDate::getSegmentDate ( const SegmentDateKey iSegmentDateKey) const

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

Note
The SegmentDate object can be inherited from, if needed. In that case, a dynamic_cast<> may be needed.
Parameters
constSegmentDateKey& The segment-date key
Returns
SegmentDate* Found SegmentDate object. NULL if not found.

Definition at line 73 of file FlightDate.cpp.

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

void stdair::FlightDate::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 142 of file FlightDate.hpp.

References toString().

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 151 of file FlightDate.hpp.

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

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 45 of file FlightDate.cpp.

References describeKey().

Referenced by toStream().

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

Get a string describing the key.

Definition at line 162 of file FlightDate.hpp.

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

Referenced by toString().

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

Serialisation.

Definition at line 187 of file CmdBomSerialiser.cpp.

References _key.

Friends And Related Function Documentation

template<typename BOM >
friend class FacBom
friend

Definition at line 36 of file FlightDate.hpp.

template<typename BOM >
friend class FacCloneBom
friend

Definition at line 37 of file FlightDate.hpp.

friend class FacBomManager
friend

Definition at line 38 of file FlightDate.hpp.

friend class boost::serialization::access
friend

Definition at line 39 of file FlightDate.hpp.

Member Data Documentation

Key_T stdair::FlightDate::_key
protected

Primary key (flight number and departure date).

Definition at line 216 of file FlightDate.hpp.

Referenced by describeKey(), getDepartureDate(), getFlightNumber(), getKey(), and serialize().

BomAbstract* stdair::FlightDate::_parent
protected

Pointer on the parent class (Inventory).

Definition at line 221 of file FlightDate.hpp.

Referenced by getParent().

HolderMap_T stdair::FlightDate::_holderMap
protected

Map holding the children (SegmentDate and LegDate objects).

Definition at line 226 of file FlightDate.hpp.

Referenced by getHolderMap().


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