Implement access to parsed OpenPOWER VPD

This change implements the access API to retrieve parsed OpenPOWER VPD.
Access is provided only to supported and valid VPD. This is achieved by
having template specializations for a valid record:keyword combination.

Change-Id: I1ec39a94bf947bebade861fd7d9c74ccaa4ac96d
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/store.hpp b/store.hpp
index e9cbeba..9da07f4 100644
--- a/store.hpp
+++ b/store.hpp
@@ -53,5 +53,23 @@
         Parsed vpd;
 };
 
+template<Record R, record::Keyword K>
+inline const std::string& Store::get() const
+{
+    static const std::string record = getRecord<R>();
+    static const std::string keyword = record::getKeyword<K>();
+    static const std::string empty = "";
+    auto kw = vpd.find(record);
+    if (vpd.end() != kw)
+    {
+        auto value = (kw->second).find(keyword);
+        if ((kw->second).end() != value)
+        {
+            return value->second;
+        }
+    }
+    return empty;
+}
+
 } // namespace vpd
 } // namespace openpower