StdAir Logo  1.00.15
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
BomRoot.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// STL
5#include <cassert>
6#include <sstream>
7// StdAir
13
14namespace stdair {
15
16 // ////////////////////////////////////////////////////////////////////
18 assert (false);
19 }
20
21 // ////////////////////////////////////////////////////////////////////
22 BomRoot::BomRoot (const BomRoot& iBomRoot) :
23 _key (iBomRoot._key), _frat5CurveHolder (iBomRoot._frat5CurveHolder),
24 _ffDisutilityCurveHolder (iBomRoot._ffDisutilityCurveHolder) {
25 }
26
27 // ////////////////////////////////////////////////////////////////////
28 BomRoot::BomRoot (const Key_T& iKey) : _key (iKey) {
29 }
30
31 // ////////////////////////////////////////////////////////////////////
34
35 // ////////////////////////////////////////////////////////////////////
36 std::string BomRoot::toString() const {
37 std::ostringstream oStr;
38 oStr << _key.toString();
39 return oStr.str();
40 }
41
42 // ////////////////////////////////////////////////////////////////////
43 Inventory* BomRoot::getInventory (const std::string& iInventoryKeyStr) const {
44 Inventory* oInventory_ptr =
45 BomManager::getObjectPtr<Inventory> (*this, iInventoryKeyStr);
46 return oInventory_ptr;
47 }
48
49 // ////////////////////////////////////////////////////////////////////
50 Inventory* BomRoot::getInventory (const InventoryKey& iInventoryKey) const {
51 return getInventory (iInventoryKey.toString());
52 }
53
54}
Handle on the StdAir library context.
static OBJECT2 * getObjectPtr(const OBJECT1 &, const MapKey_T &)
Class representing the actual attributes for the Bom root.
Definition BomRoot.hpp:32
Inventory * getInventory(const std::string &iInventoryKeyStr) const
Definition BomRoot.cpp:43
std::string toString() const
Definition BomRoot.cpp:36
Key of the BOM structure root.
const std::string toString() const
Class representing the actual attributes for an airline inventory.
Definition Inventory.hpp:41
Key of a given inventory, made of the airline code.
const std::string toString() const