Skip to content

Commit

Permalink
Added config keys map to user cli arguments and provided the struct t…
Browse files Browse the repository at this point in the history
…o config.
  • Loading branch information
Peguen committed May 16, 2024
1 parent d72adbc commit 82d8d11
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/types/ecal_config_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace eCAL
ServiceOptions service_options{};
ApplicationOptions application_options{};
LoggingOptions logging_options{};
ClArguments command_line_arguments{};
CliArguments command_line_arguments{};
std::string loaded_ecal_ini_file{};

ECAL_API eCALConfig(int argc_ , char **argv_);
Expand Down
9 changes: 5 additions & 4 deletions ecal/core/include/ecal/types/user_arg_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ namespace eCAL
{
namespace Config
{
struct ClArguments
// Map[Section][Option] = Value
using ConfigKey2DMap = std::map<std::string, std::map<std::string, std::string>>;

struct CliArguments
{
std::vector<std::string> config_keys{};
ConfigKey2DMap config_keys_map;
std::string specified_config{};
bool dump_config{};
};

// Map[Section][Option] = Value
using ConfigKey2DMap = std::map<std::string, std::map<std::string, std::string>>;
}
}
1 change: 1 addition & 0 deletions ecal/core/src/config/ecal_config_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ namespace eCAL
command_line_arguments.config_keys = parser.getConfigKeys();
command_line_arguments.specified_config = parser.getUserIni();
command_line_arguments.dump_config = parser.getDumpConfig();
command_line_arguments.config_keys_map = parser.getConfigKeysMap();

InitConfig(command_line_arguments.specified_config);
}
Expand Down

0 comments on commit 82d8d11

Please sign in to comment.