diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2016-11-25 05:41:19 -0600 |
---|---|---|
committer | Deepak Kodihalli <dkodihal@in.ibm.com> | 2016-12-08 12:40:05 -0600 |
commit | 174caf68abfb91a8307b0f7a96c23524534b2dc8 (patch) | |
tree | 7fac7414d449d408cae4edf7c0ef99bb3b7934b4 | |
parent | 683bf721d7f524aefd7d06502cfe0dfa755ac063 (diff) | |
download | openpower-vpd-parser-174caf68abfb91a8307b0f7a96c23524534b2dc8.tar.gz openpower-vpd-parser-174caf68abfb91a8307b0f7a96c23524534b2dc8.zip |
parser : implement entry method
Implement the run() method, which serves as the entry point to parse out
OpenPOWER VPD.
Change-Id: I966c38c6257f1a69b814518932c0c5c0a8386a08
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
-rw-r--r-- | impl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -293,6 +293,24 @@ internal::KeywordMap Impl::readKeywords(Binary::const_iterator iterator) return map; } +Store Impl::run() +{ + // Check if the VHDR record is present + checkHeader(); + + // Read the table of contents record, to get offsets + // to other records. + auto offsets = readTOC(); + for (const auto& offset : offsets) + { + processRecord(offset); + } + + // Return a Store object, which has interfaces to + // access parsed VPD by record:keyword + return Store(std::move(out)); +} + } // namespace parser } // namespace vpd } // namespace openpower |