StdAir Logo  1.00.8
C++ Standard Airline IT Object Library
BomRoot.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 #include <sstream>
7 // StdAir
10 #include <stdair/bom/BomRoot.hpp>
12 #include <stdair/bom/Inventory.hpp>
13 
14 namespace 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  // ////////////////////////////////////////////////////////////////////
33  }
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 }
stdair::InventoryKey::toString
const std::string toString() const
Definition: InventoryKey.cpp:46
stdair::BomRoot
Class representing the actual attributes for the Bom root.
Definition: BomRoot.hpp:32
stdair::Inventory
Class representing the actual attributes for an airline inventory.
Definition: Inventory.hpp:41
stdair::BomRoot::toString
std::string toString() const
Definition: BomRoot.cpp:36
BomRoot.hpp
stdair
Handle on the StdAir library context.
Definition: BasChronometer.cpp:9
stdair::BomRoot::_key
Key_T _key
Definition: BomRoot.hpp:191
stdair::BomRootKey
Key of the BOM structure root.
Definition: BomRootKey.hpp:25
stdair::BomRoot::getInventory
Inventory * getInventory(const std::string &iInventoryKeyStr) const
Definition: BomRoot.cpp:43
stdair::BomRoot::~BomRoot
~BomRoot()
Definition: BomRoot.cpp:32
InventoryKey.hpp
stdair::BomRootKey::toString
const std::string toString() const
Definition: BomRootKey.cpp:46
BomManager.hpp
stdair::InventoryKey
Key of a given inventory, made of the airline code.
Definition: InventoryKey.hpp:26
Inventory.hpp
BasConst_General.hpp
stdair::BomRoot::BomRoot
BomRoot()
Definition: BomRoot.cpp:17