From 744f2870311738228c090110e5d0735576abe64c Mon Sep 17 00:00:00 2001 From: Cyrille Valladeau <cyrille.valladeau@c-s.fr> Date: Thu, 15 Dec 2011 16:31:46 +0100 Subject: [PATCH] ENH: supress Role_Output parameter in CL Helper --- .../otbWrapperCommandLineLauncher.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx index fcc6d9deab..c093a74985 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx @@ -593,8 +593,11 @@ void CommandLineLauncher::DisplayHelp() m_MaxKeySize = std::string("progress").size(); for (unsigned int i = 0; i < nbOfParam; i++) { - if( m_MaxKeySize < appKeyList[i].size() ) - m_MaxKeySize = appKeyList[i].size(); + if (m_Application->GetParameterRole(appKeyList[i]) != Role_Output) + { + if( m_MaxKeySize < appKeyList[i].size() ) + m_MaxKeySize = appKeyList[i].size(); + } } //// progress report parameter @@ -602,12 +605,15 @@ void CommandLineLauncher::DisplayHelp() for(unsigned int i=0; i<m_MaxKeySize-std::string("progress").size(); i++) bigKey.append(" "); - std::cerr << " -"<<bigKey<<" <boolean> (Report progress) " << std::endl; + std::cerr << " -"<<bigKey<<" <boolean> Report progress " << std::endl; for (unsigned int i = 0; i < nbOfParam; i++) { - Parameter::Pointer param = m_Application->GetParameterByKey(appKeyList[i]); - std::cerr << this->DisplayParameterHelp(param, appKeyList[i]); + Parameter::Pointer param = m_Application->GetParameterByKey(appKeyList[i]); + if (param->GetRole() != Role_Output) + { + std::cerr << this->DisplayParameterHelp(param, appKeyList[i]); + } } } -- GitLab