Skip to content

Commit

Permalink
give user the freedom to initialize with specified ini file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peguen committed Apr 26, 2024
1 parent 557637a commit d910ef2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ecal/core/include/ecal/types/ecal_config_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ namespace eCAL
ECAL_API eCALConfig(int argc_ , char **argv_);
ECAL_API eCALConfig(std::vector<std::string> args_);

ECAL_API void InitWithDefaultIni();
ECAL_API void InitConfigWithDefaultIni();
ECAL_API void InitConfig(std::string ini_path_);

private:
ECAL_API void InitConfig(std::string ini_path_ = std::string(""));
ECAL_API void Init(int argc_ , char **argv_);
};
}
Expand Down
7 changes: 1 addition & 6 deletions ecal/core/src/config/ecal_config_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,9 @@ namespace eCAL
command_line_arguments.dump_config = parser.getDumpConfig();

InitConfig(command_line_arguments.specified_config);

if (command_line_arguments.dump_config)
{
Process::DumpConfig();
}
}

void eCALConfig::InitWithDefaultIni()
void eCALConfig::InitConfigWithDefaultIni()
{
InitConfig(g_default_ini_file);
}
Expand Down
4 changes: 4 additions & 0 deletions ecal/core/src/ecal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ namespace eCAL
// (post)initialize single components
const int success = g_globals()->Initialize(components_, &Config::GetCurrentConfig().command_line_arguments.config_keys);

if (config_.command_line_arguments.dump_config)
{
Process::DumpConfig();
}

return success;
}
Expand Down

0 comments on commit d910ef2

Please sign in to comment.