pnor_partition_table: Extract preparePartitions() loop body

Create a new private method, parseTocLine(), to handle the function of
the loop body. The eventual goal is to extract the function from the
class completely and simply have parseTocLine() as a public function in
the openpower::virtual_pnor namespace. This will facilitate testing of
the virtual PNOR parts of the codebase.

Change-Id: Ib8c3b39eb9390cfc088a54abd45aab6f551775d3
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/pnor_partition_table.hpp b/pnor_partition_table.hpp
index d3d7fa4..6e9d2fa 100644
--- a/pnor_partition_table.hpp
+++ b/pnor_partition_table.hpp
@@ -144,6 +144,20 @@
     const pnor_partition& partition(const std::string& name) const;
 
   private:
+    /** @brief Parse a ToC line (entry) into the corresponding FFS partition
+     * object.
+     *
+     * @param[in] dir - The parent directory of the FFS partition files
+     *                  described in the ToC.
+     * @param[in] line - The ToC line to parse
+     * @param[out] part - The partition object to populate with the information
+     *                    parsed from the provided ToC line
+     *
+     * @returns True on success, false on failure.
+     */
+    bool parseTocLine(fs::path& dir, const std::string& line,
+                      pnor_partition& part);
+
     /** @brief Prepares a vector of PNOR partition structures.
      */
     void preparePartitions();