satdump/src-core/common/cli_utils.h

18 lines
383 B
C
Raw Permalink Normal View History

2022-02-21 23:32:11 +01:00
#pragma once
#include <typeindex>
#include <optional>
2022-02-21 23:32:11 +01:00
#include "nlohmann/json.hpp"
/*
Parse command flags :
Flags :
--flag value
This will parse the value either as a string or number.
Switches :
--switch
This will set that parameter to true.
*/
nlohmann::json parse_common_flags(int argc, char *argv[], std::map<std::string, std::optional<std::type_index>> strong_types = {});