aboutsummaryrefslogtreecommitdiff
path: root/samples/common/include/Utils/CmdArgsParser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'samples/common/include/Utils/CmdArgsParser.hpp')
-rw-r--r--samples/common/include/Utils/CmdArgsParser.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/samples/common/include/Utils/CmdArgsParser.hpp b/samples/common/include/Utils/CmdArgsParser.hpp
new file mode 100644
index 0000000000..710a33df93
--- /dev/null
+++ b/samples/common/include/Utils/CmdArgsParser.hpp
@@ -0,0 +1,25 @@
+//
+// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+#include <string>
+#include <map>
+
+/*
+ * Checks that a particular option was specified by the user
+ */
+bool CheckOptionSpecified(const std::map<std::string, std::string>& options, const std::string& option);
+
+
+/*
+ * Retrieves the user provided option
+ */
+std::string GetSpecifiedOption(const std::map<std::string, std::string>& options, const std::string& option);
+
+
+/*
+ * Parses all the command line options provided by the user and stores in a map.
+ */
+int ParseOptions(std::map<std::string, std::string>& options, std::map<std::string, std::string>& acceptedOptions,
+ char *argv[], int argc); \ No newline at end of file