StdAir Logo  1.00.5
C++ Standard Airline IT Object Library
stdair::BomRoot Class Reference

Class representing the actual attributes for the Bom root. More...

#include <stdair/bom/BomRoot.hpp>

+ Inheritance diagram for stdair::BomRoot:

Public Types

typedef BomRootKey Key_T
 

Public Member Functions

const Key_TgetKey () const
 
const HolderMap_TgetHolderMap () const
 
const FRAT5Curve_TgetFRAT5Curve (const std::string &iKey) const
 
const FFDisutilityCurve_TgetFFDisutilityCurve (const std::string &iKey) const
 
InventorygetInventory (const std::string &iInventoryKeyStr) const
 
InventorygetInventory (const InventoryKey &) const
 
void addFRAT5Curve (const std::string &iKey, const FRAT5Curve_T &iCurve)
 
void addFFDisutilityCurve (const std::string &iKey, const FFDisutilityCurve_T &iCurve)
 
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

 BomRoot ()
 
 BomRoot (const BomRoot &)
 
 BomRoot (const Key_T &iKey)
 
 ~BomRoot ()
 

Protected Attributes

Key_T _key
 
HolderMap_T _holderMap
 
FRAT5CurveHolderStruct _frat5CurveHolder
 
FFDisutilityCurveHolderStruct _ffDisutilityCurveHolder
 

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 the Bom root.

Definition at line 32 of file BomRoot.hpp.

Member Typedef Documentation

◆ Key_T

Definition allowing to retrieve the associated BOM key type.

Definition at line 42 of file BomRoot.hpp.

Constructor & Destructor Documentation

◆ BomRoot() [1/3]

stdair::BomRoot::BomRoot ( )
protected

Default constructor.

Definition at line 17 of file BomRoot.cpp.

◆ BomRoot() [2/3]

stdair::BomRoot::BomRoot ( const BomRoot iBomRoot)
protected

Copy constructor.

Definition at line 22 of file BomRoot.cpp.

◆ BomRoot() [3/3]

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

Main constructor.

Definition at line 28 of file BomRoot.cpp.

◆ ~BomRoot()

stdair::BomRoot::~BomRoot ( )
protected

Destructor.

Definition at line 32 of file BomRoot.cpp.

Member Function Documentation

◆ getKey()

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

Get the inventory key (airline code).

Definition at line 48 of file BomRoot.hpp.

◆ getHolderMap()

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

Get the map of children.

Definition at line 53 of file BomRoot.hpp.

◆ getFRAT5Curve()

const FRAT5Curve_T& stdair::BomRoot::getFRAT5Curve ( const std::string &  iKey) const
inline

Get the FRAT5 curve corresponding to the given key.

Definition at line 58 of file BomRoot.hpp.

◆ getFFDisutilityCurve()

const FFDisutilityCurve_T& stdair::BomRoot::getFFDisutilityCurve ( const std::string &  iKey) const
inline

Get the FFDisutility curve corresponding to the given key.

Definition at line 63 of file BomRoot.hpp.

◆ getInventory() [1/2]

Inventory * stdair::BomRoot::getInventory ( const std::string &  iInventoryKeyStr) const

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

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

Definition at line 43 of file BomRoot.cpp.

Referenced by getInventory(), stdair::BomRetriever::retrieveInventoryFromKey(), and stdair::BomRetriever::retrieveInventoryFromLongKey().

◆ getInventory() [2/2]

Inventory * stdair::BomRoot::getInventory ( const InventoryKey iInventoryKey) const

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

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

Definition at line 50 of file BomRoot.cpp.

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

◆ addFRAT5Curve()

void stdair::BomRoot::addFRAT5Curve ( const std::string &  iKey,
const FRAT5Curve_T iCurve 
)
inline

Add a new FRAT5 curve to the holder.

Definition at line 93 of file BomRoot.hpp.

◆ addFFDisutilityCurve()

void stdair::BomRoot::addFFDisutilityCurve ( const std::string &  iKey,
const FFDisutilityCurve_T iCurve 
)
inline

Add a new FF disutility curve to the holder.

Definition at line 98 of file BomRoot.hpp.

◆ toStream()

void stdair::BomRoot::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 111 of file BomRoot.hpp.

◆ fromStream()

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 120 of file BomRoot.hpp.

◆ toString()

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

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 36 of file BomRoot.cpp.

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

◆ describeKey()

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

Get a string describing the key.

Definition at line 131 of file BomRoot.hpp.

◆ serialize()

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

Serialisation.

That method is used both for serialisation a BOM tree (into a backup file/stream), as well as re-instantiating a BOM tree from a back-up file/stream.

Note
The implementation of that method is to be found in the CmdBomSerialiser command.

Definition at line 133 of file CmdBomSerialiser.cpp.

References _key.

Friends And Related Function Documentation

◆ FacBom

template<typename BOM >
friend class FacBom
friend

Definition at line 33 of file BomRoot.hpp.

◆ FacCloneBom

template<typename BOM >
friend class FacCloneBom
friend

Definition at line 34 of file BomRoot.hpp.

◆ FacBomManager

friend class FacBomManager
friend

Definition at line 35 of file BomRoot.hpp.

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 36 of file BomRoot.hpp.

Member Data Documentation

◆ _key

◆ _holderMap

HolderMap_T stdair::BomRoot::_holderMap
protected

Map holding the children (Inventory objects).

Definition at line 196 of file BomRoot.hpp.

◆ _frat5CurveHolder

FRAT5CurveHolderStruct stdair::BomRoot::_frat5CurveHolder
protected

Holder of FRAT5 curves.

Definition at line 201 of file BomRoot.hpp.

◆ _ffDisutilityCurveHolder

FFDisutilityCurveHolderStruct stdair::BomRoot::_ffDisutilityCurveHolder
protected

Holder of fare family disutility curves.

Definition at line 206 of file BomRoot.hpp.


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