StdAir Logo  1.00.18
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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
 
template<class T>
struct boost::archive::detail::heap_allocation
 

Detailed Description

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

Definition at line 42 of file FlightDate.hpp.

Member Typedef Documentation

◆ Key_T

Definition allowing to retrieve the associated BOM key type.

Definition at line 54 of file FlightDate.hpp.

Constructor & Destructor Documentation

◆ FlightDate()

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

Main constructor.

Definition at line 29 of file FlightDate.cpp.

References _key, _parent, and FlightDate().

Referenced by FlightDate().

◆ ~FlightDate()

stdair::FlightDate::~FlightDate ( )
protectedvirtual

Destructor.

Definition at line 33 of file FlightDate.cpp.

Member Function Documentation

◆ getKey()

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

Get the flight-date key.

Definition at line 60 of file FlightDate.hpp.

References _key.

◆ getParent()

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

Get the parent object.

Definition at line 65 of file FlightDate.hpp.

References _parent, and stdair::BomAbstract::BomAbstract().

Referenced by getAirlineCode().

◆ getFlightNumber()

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

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

Definition at line 70 of file FlightDate.hpp.

References _key.

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

◆ getDepartureDate()

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

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

Definition at line 75 of file FlightDate.hpp.

References _key.

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

◆ getAirlineCode()

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().

◆ getHolderMap()

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

Get the map of children holders.

Definition at line 91 of file FlightDate.hpp.

References _holderMap.

◆ getLegDate() [1/2]

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.

References stdair::BomManager::getObjectPtr().

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

◆ getLegDate() [2/2]

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().

◆ getSegmentDate() [1/2]

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 64 of file FlightDate.cpp.

References stdair::BomManager::getObjectPtr().

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

◆ getSegmentDate() [2/2]

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 72 of file FlightDate.cpp.

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

◆ toStream()

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

References toString().

◆ fromStream()

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

◆ toString()

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().

◆ describeKey()

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

Get a string describing the key.

Definition at line 170 of file FlightDate.hpp.

References _key.

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

◆ serialize()

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

Friends And Related Symbol Documentation

◆ FacBom

template<typename BOM>
friend class FacBom
friend

Definition at line 43 of file FlightDate.hpp.

References FacBom.

Referenced by FacBom.

◆ FacCloneBom

template<typename BOM>
friend class FacCloneBom
friend

Definition at line 44 of file FlightDate.hpp.

References FacCloneBom.

Referenced by FacCloneBom.

◆ FacBomManager

friend class FacBomManager
friend

Definition at line 45 of file FlightDate.hpp.

References FacBomManager.

Referenced by FacBomManager.

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 46 of file FlightDate.hpp.

References boost::serialization::access.

Referenced by boost::serialization::access.

◆ boost::archive::detail::heap_allocation

template<class T>
friend struct boost::archive::detail::heap_allocation
friend

Definition at line 47 of file FlightDate.hpp.

Member Data Documentation

◆ _key

Key_T stdair::FlightDate::_key
protected

Primary key (flight number and departure date).

Definition at line 224 of file FlightDate.hpp.

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

◆ _parent

BomAbstract* stdair::FlightDate::_parent
protected

Pointer on the parent class (Inventory).

Definition at line 229 of file FlightDate.hpp.

Referenced by FlightDate(), and getParent().

◆ _holderMap

HolderMap_T stdair::FlightDate::_holderMap
protected

Map holding the children (SegmentDate and LegDate objects).

Definition at line 234 of file FlightDate.hpp.

Referenced by getHolderMap().


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