Skip to content
Snippets Groups Projects
Commit b8e89d32 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: Mantis #968: only check mandatory parameters after all values have been set

parent 1d9f08ee
No related branches found
No related tags found
No related merge requests found
......@@ -386,6 +386,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
const std::vector<std::string> appKeyList = m_Application->GetParametersKeys(true);
// Loop over each parameter key declared in the application
// FIRST PASS : set parameter values
for (unsigned int i = 0; i < appKeyList.size(); i++)
{
const std::string paramKey(appKeyList[i]);
......@@ -540,6 +541,16 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
m_Application->UpdateParameters();
}
}
}
// SECOND PASS : check mandatory parameters
for (unsigned int i = 0; i < appKeyList.size(); i++)
{
const std::string paramKey(appKeyList[i]);
Parameter::Pointer param = m_Application->GetParameterByKey(paramKey);
ParameterType type = m_Application->GetParameterType(paramKey);
const bool paramExists(m_Parser->IsAttributExists(std::string("-").append(paramKey), m_VExpression));
std::vector<std::string> values;
// When a parameter is mandatory :
// it must be set if :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment