StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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:

List of all members.

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

class FacBom
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 45 of file FlightDate.hpp.


Constructor & Destructor Documentation

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

Main constructor.

Definition at line 30 of file FlightDate.cpp.

stdair::FlightDate::~FlightDate ( ) [protected, virtual]

Destructor.

Definition at line 34 of file FlightDate.cpp.


Member Function Documentation

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

Get the flight-date key.

Definition at line 51 of file FlightDate.hpp.

References _key.

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

Get the parent object.

Definition at line 56 of file FlightDate.hpp.

References _parent.

Referenced by getAirlineCode().

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

Definition at line 61 of file FlightDate.hpp.

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

Referenced by stdair::BomJSONExport::jsonExport().

const Date_T& stdair::FlightDate::getDepartureDate ( ) const [inline]

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

Definition at line 66 of file FlightDate.hpp.

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

Referenced by stdair::BomJSONExport::jsonExport().

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 FlightDate.cpp.

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

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

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

Get the map of children holders.

Definition at line 82 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 53 of file FlightDate.cpp.

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

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 60 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 66 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 74 of file FlightDate.cpp.

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

void stdair::FlightDate::toStream ( std::ostream &  ioOut) const [inline, virtual]

Dump a Business Object into an output stream.

Parameters:
ostream&the output stream.

Implements stdair::BomAbstract.

Definition at line 141 of file FlightDate.hpp.

References toString().

void stdair::FlightDate::fromStream ( std::istream &  ioIn) [inline, virtual]

Read a Business Object from an input stream.

Parameters:
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 150 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 46 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 161 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

friend class FacBom [friend]

Definition at line 36 of file FlightDate.hpp.

friend class FacBomManager [friend]

Definition at line 37 of file FlightDate.hpp.

friend class boost::serialization::access [friend]

Definition at line 38 of file FlightDate.hpp.


Member Data Documentation

Primary key (flight number and departure date).

Definition at line 215 of file FlightDate.hpp.

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

Pointer on the parent class (Inventory).

Definition at line 220 of file FlightDate.hpp.

Referenced by getParent().

Map holding the children (SegmentDate and LegDate objects).

Definition at line 225 of file FlightDate.hpp.

Referenced by getHolderMap().


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