summaryrefslogtreecommitdiff
path: root/libkms++util/opts.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
commit17d180891f1e237ea5d25835999a8b23a6e7946d (patch)
tree5963fe4d338f6272daf55c76ed355effb47afc71 /libkms++util/opts.h
parent38a71ee72c47f3287c327113ce411f236cac05ef (diff)
rename dirs
Diffstat (limited to 'libkms++util/opts.h')
-rw-r--r--libkms++util/opts.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/libkms++util/opts.h b/libkms++util/opts.h
deleted file mode 100644
index 1b0fd22..0000000
--- a/libkms++util/opts.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#pragma once
-
-#include <string>
-#include <vector>
-#include <functional>
-
-class Option
-{
- friend class OptionSet;
-public:
- Option(const std::string& str, std::function<void()> func);
- Option(const std::string& str, std::function<void(const std::string)> func);
-
-private:
- void parse(const std::string& str);
-
- char m_short;
- std::string m_long;
- int m_has_arg;
- std::function<void()> m_void_func;
- std::function<void(const std::string)> m_func;
-};
-
-class OptionSet
-{
-public:
- OptionSet(std::initializer_list<Option> il);
-
- void parse(int argc, char** argv);
-
- const std::vector<std::string> params() const { return m_params; }
-
-private:
- const Option& find_opt(int c);
-
- const std::vector<Option> m_opts;
- std::vector<std::string> m_params;
-};