$treeview $search $mathjax
00001 // ////////////////////////////////////////////////////////////////////// 00002 // Import section 00003 // ////////////////////////////////////////////////////////////////////// 00004 // STL 00005 #include <cassert> 00006 #include <sstream> 00007 // StdAir 00008 #include <stdair/basic/BasConst_General.hpp> 00009 #include <stdair/bom/BomManager.hpp> 00010 #include <stdair/bom/BomRoot.hpp> 00011 #include <stdair/bom/InventoryKey.hpp> 00012 #include <stdair/bom/Inventory.hpp> 00013 00014 namespace stdair { 00015 00016 // //////////////////////////////////////////////////////////////////// 00017 BomRoot::BomRoot() { 00018 assert (false); 00019 } 00020 00021 // //////////////////////////////////////////////////////////////////// 00022 BomRoot::BomRoot (const BomRoot& iBomRoot) : 00023 _key (iBomRoot._key), _frat5CurveHolder (iBomRoot._frat5CurveHolder), 00024 _ffDisutilityCurveHolder (iBomRoot._ffDisutilityCurveHolder) { 00025 } 00026 00027 // //////////////////////////////////////////////////////////////////// 00028 BomRoot::BomRoot (const Key_T& iKey) : _key (iKey) { 00029 } 00030 00031 // //////////////////////////////////////////////////////////////////// 00032 BomRoot::~BomRoot() { 00033 } 00034 00035 // //////////////////////////////////////////////////////////////////// 00036 std::string BomRoot::toString() const { 00037 std::ostringstream oStr; 00038 oStr << _key.toString(); 00039 return oStr.str(); 00040 } 00041 00042 // //////////////////////////////////////////////////////////////////// 00043 Inventory* BomRoot::getInventory (const std::string& iInventoryKeyStr) const { 00044 Inventory* oInventory_ptr = 00045 BomManager::getObjectPtr<Inventory> (*this, iInventoryKeyStr); 00046 return oInventory_ptr; 00047 } 00048 00049 // //////////////////////////////////////////////////////////////////// 00050 Inventory* BomRoot::getInventory (const InventoryKey& iInventoryKey) const { 00051 return getInventory (iInventoryKey.toString()); 00052 } 00053 00054 }