AirInv Logo  0.1.2
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
BomRootHelper.cpp
Go to the documentation of this file.
00001 // //////////////////////////////////////////////////////////////////////
00002 // Import section
00003 // //////////////////////////////////////////////////////////////////////
00004 // STL
00005 #include <cassert>
00006 // STDAIR
00007 #include <stdair/bom/BomManager.hpp>
00008 #include <stdair/bom/BomRoot.hpp>
00009 #include <stdair/bom/Inventory.hpp>
00010 // AIRINV
00011 #include <airinv/bom/BomRootHelper.hpp>
00012 #include <airinv/bom/InventoryHelper.hpp>
00013 
00014 namespace AIRINV {
00015   // ////////////////////////////////////////////////////////////////////
00016   void BomRootHelper::fillFromRouting (const stdair::BomRoot& iBomRoot) {
00017     const stdair::InventoryList_T& lInventoryList =
00018       stdair::BomManager::getList<stdair::Inventory> (iBomRoot);
00019     
00020     // Browse the list of inventories and update each inventory.
00021     for (stdair::InventoryList_T::const_iterator itInventory =
00022            lInventoryList.begin();
00023          itInventory != lInventoryList.end(); ++itInventory) {
00024       const stdair::Inventory* lCurrentInventory_ptr = *itInventory;
00025       assert (lCurrentInventory_ptr != NULL);
00026       InventoryHelper::fillFromRouting (*lCurrentInventory_ptr);
00027     }
00028   }
00029 
00030 }