summaryrefslogtreecommitdiffstats
path: root/argument.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2016-10-18 14:33:17 -0500
committerMatthew Barth <msbarth@us.ibm.com>2016-10-18 14:33:17 -0500
commit155c34fbb61071f5b51240c4a50b49391e0877c1 (patch)
treead24d5388d2c8d04ab9e5f1d77a9cf221265d234 /argument.hpp
parent619db930483505aa4352b8ae30d6c6b5a9b569cf (diff)
downloadipmi-fru-parser-155c34fbb61071f5b51240c4a50b49391e0877c1.tar.gz
ipmi-fru-parser-155c34fbb61071f5b51240c4a50b49391e0877c1.zip
Change H->hpp & C->cpp
Change-Id: I4bb8cf7a58c517f348a524d3e027ebcd1dcd0dea Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'argument.hpp')
-rw-r--r--argument.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/argument.hpp b/argument.hpp
new file mode 100644
index 0000000..bd3b0b2
--- /dev/null
+++ b/argument.hpp
@@ -0,0 +1,27 @@
+#ifndef __ARGUMENT_H
+#define __ARGUMENT_H
+#include <getopt.h>
+#include <map>
+#include <string>
+class ArgumentParser
+{
+ public:
+ ArgumentParser(int argc, char** argv);
+ const std::string& operator[](const std::string& opt);
+
+ static void usage(char** argv);
+
+ static const std::string true_string;
+ static const std::string empty_string;
+
+ private:
+ std::map<const std::string, std::string> arguments;
+
+ static const option options[];
+ static const char* optionstr;
+
+ private:
+ ArgumentParser() {};
+};
+
+#endif
OpenPOWER on IntegriCloud