satdump/src-core/common/cli_utils.h
2024-05-06 16:13:21 -04:00

18 lines
No EOL
383 B
C++

#pragma once
#include <typeindex>
#include <optional>
#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 = {});