2021-08-20 12:25:24 +00:00
|
|
|
#ifndef EXAMPLE_02_ARG_PARSE_HPP
|
|
|
|
#define EXAMPLE_02_ARG_PARSE_HPP
|
|
|
|
|
2021-08-24 05:14:42 +00:00
|
|
|
constexpr const char *EX02_ARG_PARSE_SINGLE_ARG_PLACEHOLDER =
|
|
|
|
"SINGLE_ARG_PLACEHOLDER";
|
2021-08-20 12:25:24 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <unordered_map>
|
2021-08-24 03:42:18 +00:00
|
|
|
#include <unordered_set>
|
2021-08-20 12:25:24 +00:00
|
|
|
|
2021-08-24 05:14:42 +00:00
|
|
|
namespace Ex02::ArgParse {
|
2021-08-20 12:25:24 +00:00
|
|
|
|
2021-08-24 05:14:42 +00:00
|
|
|
using ArgsType = std::unordered_set<std::string>;
|
|
|
|
using ParseResult = std::unordered_map<std::string, std::string>;
|
2021-08-20 12:25:24 +00:00
|
|
|
|
2021-08-24 05:14:42 +00:00
|
|
|
ParseResult parseArgs(int argc, char **argv, const ArgsType &singleArgs,
|
|
|
|
const ArgsType &doubleArgs);
|
2021-08-20 12:25:24 +00:00
|
|
|
|
2021-08-24 05:14:42 +00:00
|
|
|
} // namespace Ex02::ArgParse
|
2021-08-20 12:25:24 +00:00
|
|
|
|
|
|
|
#endif
|