StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
stdair::BomRoot Class Reference

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

#include <stdair/bom/BomRoot.hpp>

+ Inheritance diagram for stdair::BomRoot:

List of all members.

Public Types

typedef BomRootKey Key_T

Public Member Functions

const Key_TgetKey () const
const HolderMap_TgetHolderMap () const
InventorygetInventory (const std::string &iInventoryKeyStr) const
InventorygetInventory (const InventoryKey &) 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

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

Protected Attributes

Key_T _key
HolderMap_T _holderMap

Friends

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

Detailed Description

Class representing the actual attributes for the Bom root.

Definition at line 30 of file BomRoot.hpp.


Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 39 of file BomRoot.hpp.


Constructor & Destructor Documentation

stdair::BomRoot::BomRoot ( ) [protected]

Default constructor.

Definition at line 17 of file BomRoot.cpp.

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

Copy constructor.

Definition at line 22 of file BomRoot.cpp.

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

Main constructor.

Definition at line 27 of file BomRoot.cpp.

stdair::BomRoot::~BomRoot ( ) [protected]

Destructor.

Definition at line 31 of file BomRoot.cpp.


Member Function Documentation

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

Get the inventory key (airline code).

Definition at line 45 of file BomRoot.hpp.

References _key.

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

Get the map of children.

Definition at line 50 of file BomRoot.hpp.

References _holderMap.

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 42 of file BomRoot.cpp.

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

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 49 of file BomRoot.cpp.

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

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

References toString().

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

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

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 35 of file BomRoot.cpp.

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

Referenced by toStream().

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

Get a string describing the key.

Definition at line 106 of file BomRoot.hpp.

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

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

friend class FacBom [friend]

Definition at line 31 of file BomRoot.hpp.

friend class FacBomManager [friend]

Definition at line 32 of file BomRoot.hpp.

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

Definition at line 33 of file BomRoot.hpp.


Member Data Documentation

Primary key.

Definition at line 166 of file BomRoot.hpp.

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

Map holding the children (Inventory objects).

Definition at line 171 of file BomRoot.hpp.

Referenced by getHolderMap().


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