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::Inventory Class Reference

Class representing the actual attributes for an airline inventory. More...

#include <stdair/bom/Inventory.hpp>

+ Inheritance diagram for stdair::Inventory:

Public Types

typedef InventoryKey Key_T

Public Member Functions

const Key_TgetKey () const
const AirlineCode_TgetAirlineCode () const
BomAbstract *const getParent () const
const HolderMap_TgetHolderMap () const
FlightDategetFlightDate (const std::string &iFlightDateKeyStr) const
FlightDategetFlightDate (const FlightDateKey &) const
void setAirlineFeature (const AirlineFeature *ioAirlineFeaturePtr)
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

 Inventory (const Key_T &)
 ~Inventory ()

Protected Attributes

Key_T _key
BomAbstract_parent
const AirlineFeature_airlineFeature
HolderMap_T _holderMap

Friends

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

Detailed Description

Class representing the actual attributes for an airline inventory.

Definition at line 33 of file Inventory.hpp.

Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 43 of file Inventory.hpp.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 27 of file Inventory.cpp.

stdair::Inventory::~Inventory ( )
protected

Destructor.

Definition at line 31 of file Inventory.cpp.

Member Function Documentation

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

Get the inventory key (airline code).

Definition at line 49 of file Inventory.hpp.

References _key.

const AirlineCode_T& stdair::Inventory::getAirlineCode ( ) const
inline

Get the airline code (inventory/primary key).

Definition at line 54 of file Inventory.hpp.

References _key, and stdair::InventoryKey::getAirlineCode().

Referenced by stdair::OnDDate::getAirlineCode(), stdair::FlightDate::getAirlineCode(), and stdair::BomRetriever::retrieveSegmentDateFromLongKey().

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

Get the parent object.

Definition at line 59 of file Inventory.hpp.

References _parent.

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

Get the map of children.

Definition at line 64 of file Inventory.hpp.

References _holderMap.

FlightDate * stdair::Inventory::getFlightDate ( const std::string &  iFlightDateKeyStr) const

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

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

Definition at line 43 of file Inventory.cpp.

Referenced by getFlightDate(), stdair::BomRetriever::retrieveFlightDateFromKey(), and stdair::BomRetriever::retrieveFlightDateFromLongKey().

FlightDate * stdair::Inventory::getFlightDate ( const FlightDateKey iFlightDateKey) const

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

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

Definition at line 51 of file Inventory.cpp.

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

void stdair::Inventory::setAirlineFeature ( const AirlineFeature ioAirlineFeaturePtr)
inline

Set the airline feature.

Definition at line 96 of file Inventory.hpp.

References _airlineFeature.

void stdair::Inventory::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 108 of file Inventory.hpp.

References toString().

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 117 of file Inventory.hpp.

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

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 35 of file Inventory.cpp.

References describeKey().

Referenced by toStream().

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

Get a string describing the key.

Definition at line 128 of file Inventory.hpp.

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

Referenced by toString().

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

Serialisation.

Definition at line 160 of file CmdBomSerialiser.cpp.

References _key.

Friends And Related Function Documentation

friend class FacBom
friend

Definition at line 34 of file Inventory.hpp.

friend class FacBomManager
friend

Definition at line 35 of file Inventory.hpp.

friend class boost::serialization::access
friend

Definition at line 36 of file Inventory.hpp.

Member Data Documentation

Key_T stdair::Inventory::_key
protected

Primary key (airline code).

Definition at line 180 of file Inventory.hpp.

Referenced by describeKey(), getAirlineCode(), getKey(), and serialize().

BomAbstract* stdair::Inventory::_parent
protected

Pointer on the parent class (BomRoot).

Definition at line 185 of file Inventory.hpp.

Referenced by getParent().

const AirlineFeature* stdair::Inventory::_airlineFeature
protected

Features specific to the airline.

Definition at line 190 of file Inventory.hpp.

Referenced by setAirlineFeature().

HolderMap_T stdair::Inventory::_holderMap
protected

Map holding the children (FlightDate objects).

Definition at line 195 of file Inventory.hpp.

Referenced by getHolderMap().


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