Add argument parser
Add command-line argument parser for the main application. This is built
over the GNU getopt.
Change-Id: Ida6ea6894d4832fd631d8bd1e2b6f4a3fb496023
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/args.hpp b/args.hpp
new file mode 100644
index 0000000..ee82986
--- /dev/null
+++ b/args.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <string>
+#include <unordered_map>
+
+namespace openpower
+{
+namespace vpd
+{
+namespace args
+{
+
+using Args = std::unordered_map<std::string,
+ std::vector<std::string>>;
+
+/** @brief Command-line argument parser for openpower-read-vpd
+ *
+ * @param[in] argc - argument count
+ * @param[in] argv - argument array
+ *
+ * @returns map of argument:value
+ */
+Args parse(int argc, char** argv);
+
+/** @brief Display usage of openpower-vpd-read
+ *
+ * @param[in] argv - argument array
+ */
+void usage(char** argv);
+
+} // namespace args
+} // namespace vpd
+} // namespace openpower