regulators: Build IDMap for system

The IDMap class is used to map string IDs to the corresponding C++
Device, Rail, and Rule objects.

The IDMap class is complete and tested, but it was not previously being
populated except in testcases.

Add new methods to the System, Chassis, and Device classes to populate
the IDMap with all the ID -> object mappings in the system.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I80f39b663b011ca643c91f7281ff50c956631331
diff --git a/phosphor-regulators/src/chassis.hpp b/phosphor-regulators/src/chassis.hpp
index d9eec81..1fe74cb 100644
--- a/phosphor-regulators/src/chassis.hpp
+++ b/phosphor-regulators/src/chassis.hpp
@@ -16,6 +16,7 @@
 #pragma once
 
 #include "device.hpp"
+#include "id_map.hpp"
 
 #include <memory>
 #include <stdexcept>
@@ -74,6 +75,13 @@
     }
 
     /**
+     * Adds the Device and Rail objects in this chassis to the specified IDMap.
+     *
+     * @param idMap mapping from IDs to the associated Device/Rail/Rule objects
+     */
+    void addToIDMap(IDMap& idMap);
+
+    /**
      * Returns the devices within this chassis, if any.
      *
      * The vector contains regulator devices and any related devices