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