Alpana Kumari | a00936f | 2020-04-14 07:15:46 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "impl.hpp" |
| 4 | #include "types.hpp" |
| 5 | |
| 6 | namespace openpower |
| 7 | { |
| 8 | namespace vpd |
| 9 | { |
| 10 | namespace memory |
| 11 | { |
| 12 | namespace parser |
| 13 | { |
| 14 | |
| 15 | class memoryVpdParser |
| 16 | { |
| 17 | public: |
| 18 | /** |
| 19 | * @brief Move Constructor |
| 20 | * |
| 21 | * Move kwVpdVector to parser object's kwVpdVector |
| 22 | */ |
| 23 | memoryVpdParser(Binary&& memVpdVector) : memVpd(std::move(memVpdVector)) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * @brief Destructor |
| 29 | * |
| 30 | * Delete the parser object |
| 31 | */ |
| 32 | ~memoryVpdParser(){}; |
| 33 | |
| 34 | /** |
| 35 | * @brief Parse the memory VPD binary data. |
| 36 | * |
| 37 | * Collects and emplace the keyword-value pairs in map. |
| 38 | * |
| 39 | * @return map of keyword:value |
| 40 | */ |
| 41 | inventory::KeywordVpdMap parseMemVpd(); |
| 42 | |
| 43 | private: |
| 44 | /** |
| 45 | */ |
| 46 | inventory::KeywordVpdMap readKeywords(Binary::const_iterator iterator); |
| 47 | |
| 48 | /** |
| 49 | */ |
| 50 | Binary memVpd; |
| 51 | }; |
| 52 | } // namespace parser |
| 53 | } // namespace memory |
| 54 | } // namespace vpd |
| 55 | } // namespace openpower |