StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  assert (false);
24  }
25 
26  // ////////////////////////////////////////////////////////////////////
27  BomRoot::BomRoot (const Key_T& iKey) : _key (iKey) {
28  }
29 
30  // ////////////////////////////////////////////////////////////////////
32  }
33 
34  // ////////////////////////////////////////////////////////////////////
35  std::string BomRoot::toString() const {
36  std::ostringstream oStr;
37  oStr << _key.toString();
38  return oStr.str();
39  }
40 
41  // ////////////////////////////////////////////////////////////////////
42  Inventory* BomRoot::getInventory (const std::string& iInventoryKeyStr) const {
43  Inventory* oInventory_ptr =
44  BomManager::getObjectPtr<Inventory> (*this, iInventoryKeyStr);
45  return oInventory_ptr;
46  }
47 
48  // ////////////////////////////////////////////////////////////////////
49  Inventory* BomRoot::getInventory (const InventoryKey& iInventoryKey) const {
50  return getInventory (iInventoryKey.toString());
51  }
52 
53 }