/** * libdatachannel streamer example * Copyright (c) 2020 Filip Klembara (in2core) * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #ifndef ArgParser_hpp #define ArgParser_hpp #include #include #include #include #include #include #include struct ArgParser { private: std::set options{}; std::set flags{}; std::unordered_map shortToLongMap{}; public: ArgParser(std::vector> options, std::vector> flags); std::optional toKey(std::string prefixedKey); bool parse(int argc, char **argv, std::function onOption, std::function onFlag); }; #endif /* ArgParser_hpp */