From 8f3eba3b4c3a7a8f152f94498f012862ac52f57a Mon Sep 17 00:00:00 2001 From: OTB Bot <otbbot@orfeo-toolbox.org> Date: Thu, 15 Sep 2011 19:55:32 +0200 Subject: [PATCH] STYLE --- Code/ApplicationEngine/otbWrapperTypes.h | 1 - .../otbApplicationLauncherCommandLine.cxx | 2 +- .../otbWrapperCommandLineLauncher.cxx | 22 +++++++++---------- .../otbWrapperCommandLineLauncher.h | 20 ++++++++--------- Code/Wrappers/QtWidget/itkQtProgressBar.cxx | 6 ++--- Code/Wrappers/QtWidget/itkQtProgressBar.h | 2 +- 6 files changed, 26 insertions(+), 27 deletions(-) diff --git a/Code/ApplicationEngine/otbWrapperTypes.h b/Code/ApplicationEngine/otbWrapperTypes.h index 7d388f6046..e76a46a4d5 100644 --- a/Code/ApplicationEngine/otbWrapperTypes.h +++ b/Code/ApplicationEngine/otbWrapperTypes.h @@ -87,7 +87,6 @@ typedef otb::VectorData<VectorDataCoordinatePrecisionType, typedef otb::ObjectList<FloatVectorImageType> FloatVectorImageListType; - } // end namespace Wrapper } //end namespace otb diff --git a/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx b/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx index 5bfa374d9c..a8fa447e28 100644 --- a/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx +++ b/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx @@ -35,7 +35,7 @@ int main(int argc, char* argv[]) if( i!= argc-1) { exp.append(argv[i]); - exp.append(" "); + exp.append(" "); } else { diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx index 3e8bf888f2..c2ab458966 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx @@ -85,7 +85,7 @@ CommandLineLauncher::Load() if( this->CheckUnicity() == false ) { std::cerr<<"ERROR: At least one key is not unique in the expression..."<<std::endl; - return false; + return false; } if ( this->LoadPath() == false ) @@ -110,7 +110,7 @@ CommandLineLauncher::Execute() m_Application->Execute(); return true; -} +} bool @@ -132,7 +132,7 @@ CommandLineLauncher::BeforeExecute() { if( m_Application.IsNull() ) { - itkExceptionMacro("No application loaded"); + itkExceptionMacro("No application loaded"); } // if help is asked... @@ -209,7 +209,7 @@ CommandLineLauncher::LoadPath() // Contain paths into a string, separating each path with ":" m_Path = std::string(""); for( unsigned i=0; i<pathList.size(); i++) - { + { m_Path.append(pathList[i]); m_Path.append(":"); } @@ -232,7 +232,7 @@ CommandLineLauncher::LoadApplication() std::string moduleName; if( m_Parser->GetModuleName( moduleName, m_Expression ) != CommandLineParser::OK ) { - std::cerr << "ERROR: LoadApplication, no module found..." <<std::endl; + std::cerr << "ERROR: LoadApplication, no module found..." <<std::endl; return; } @@ -310,8 +310,8 @@ CommandLineLauncher::LoadParameters() // Single value parameter - if( type == ParameterType_Choice || type == ParameterType_Float || type == ParameterType_Int || type == ParameterType_Radius - || type == ParameterType_Directory || type == ParameterType_String || type == ParameterType_Filename || type == ParameterType_InputComplexImage + if( type == ParameterType_Choice || type == ParameterType_Float || type == ParameterType_Int || type == ParameterType_Radius + || type == ParameterType_Directory || type == ParameterType_String || type == ParameterType_Filename || type == ParameterType_InputComplexImage || type == ParameterType_InputImage || type == ParameterType_InputVectorData || type == ParameterType_OutputImage || type == ParameterType_OutputVectorData ) { m_Application->SetParameterString( param->GetKey(), values[0] ); @@ -354,11 +354,11 @@ CommandLineLauncher::LinkWatchers() std::vector<std::string> paramList = m_Application->GetParametersKeys(true); std::vector<std::string>::const_iterator it = paramList.begin(); std::cout<<"BRRRRRRRRRRRRRRR"<<std::endl; - for ( ; it != paramList.end(); ++it) + for (; it != paramList.end(); ++it) { if (m_Application->GetParameterType(*it) == ParameterType_OutputImage) { - std::cout<<"-------------------------------------------------------------t'en as?"<<std::endl; + std::cout<<"-------------------------------------------------------------t'en as?"<<std::endl; Parameter* param = m_Application->GetParameterByKey(*it); OutputImageParameter* outputParam = dynamic_cast<OutputImageParameter*>(param); itk::OStringStream oss; @@ -398,7 +398,7 @@ CommandLineLauncher::DisplayHelp() std::cerr<<"\t Description: Paths to the executable library."<<std::endl; if( !m_Parser->IsAttributExists( m_Parser->GetModulePathKey(), m_Expression ) ) std::cerr<<"\t Status: ENVIRONEMENT PATH"<<std::endl; - else if( m_Path == "") + else if( m_Path == "") std::cerr<< "\t Status: NO VALUE ASSOCIATED "<<m_Path<<std::endl; else std::cerr<< "\t Status: USER VALUE: "<<m_Path<<std::endl; @@ -421,7 +421,7 @@ CommandLineLauncher::DisplayHelp() std::cerr<<"\t Default value: 1"<< std::endl; if( !m_Parser->IsAttributExists( "--progress", m_Expression ) ) std::cerr<<"\t Status: DEFAULT VALUE"<<std::endl; - else if( m_Parser->GetAttribut( "--progress", m_Expression ).size() == 0 ) + else if( m_Parser->GetAttribut( "--progress", m_Expression ).size() == 0 ) std::cerr<< "\t Status: none"<<m_Path<<std::endl; else std::cerr<< "\t Status: USER VALUE: "<<m_Parser->GetAttribut( "--progress", m_Expression )[0]<<std::endl; diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h index aa588a9780..60bcfc07ba 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h @@ -38,7 +38,7 @@ namespace Wrapper /** \class CommandLineLauncher * \brief This class check the validity of a command line application. - * + * * To be valid, the expression must be as follow: * ModuleName --attribut1_Key attrubut1_Value --attribut2_Key attrubut2_Value * After the attribut key, if the user give several values (expression without \"--\" separated by space), it will automacally be interpreted as a list. @@ -59,7 +59,7 @@ public: itkNewMacro(Self); /** RTTI support */ - itkTypeMacro(CommandLineLauncher,itk::Object); + itkTypeMacro(CommandLineLauncher, itk::Object); /** Parse result enum */ typedef CommandLineParser::ParseResultType ParseResultType; @@ -79,22 +79,22 @@ public: /** same as Load method but set the expression before. */ bool Load( const std::string & exp ); - /** Launch the process, using the Execute application method + /** Launch the process, using the Execute application method * The method will check if the user asked for help (looking at --help key) before loading parameter and launching process. **/ bool Execute(); - /** Launch the process, using the ExecuteAndWriteOutput application method + /** Launch the process, using the ExecuteAndWriteOutput application method * The method will check if the user asked for help (looking at --help key) before loading parameter and launching process. */ bool ExecuteAndWriteOutput(); - /** Gather the code process to do before Execute and ExecuteAndWriteOutput + /** Gather the code process to do before Execute and ExecuteAndWriteOutput * Returns false if a problem occurs, true otherwise. */ bool BeforeExecute(); - /** Create and display the help of the application */ + /** Create and display the help of the application */ void DisplayHelp(); protected: @@ -109,20 +109,20 @@ protected: /** Load the executable path. It looks for the key --modulePath, extract and interpret as path the following strings. */ bool LoadPath(); - /** Load the application calling the CreateApplication method of the ApplicationRegistry classes. + /** Load the application calling the CreateApplication method of the ApplicationRegistry classes. * Pay attention, the executable paths have to be loaded or set in the environment before calling the function. */ void LoadApplication(); /** Parse the user expression, extract the key and the associated string and set it as value of each corresonding application parameter. */ CommandLineLauncher::ParamResultType LoadParameters(); - /** Create and display the help of the application */ + /** Create and display the help of the application */ std::string DisplayParameterHelp( const Parameter::Pointer & param ); - /** Check if each key is unique in the expression. */ + /** Check if each key is unique in the expression. */ bool CheckUnicity(); - /** Check if each key is valid for the application. */ + /** Check if each key is valid for the application. */ bool CheckKeyValidity(); /** Load the watchers for internal progress and writeing progress report. */ diff --git a/Code/Wrappers/QtWidget/itkQtProgressBar.cxx b/Code/Wrappers/QtWidget/itkQtProgressBar.cxx index 534eaa3e70..fdc37b99c1 100644 --- a/Code/Wrappers/QtWidget/itkQtProgressBar.cxx +++ b/Code/Wrappers/QtWidget/itkQtProgressBar.cxx @@ -9,8 +9,8 @@ Copyright (c) 2002 Insight Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ @@ -64,7 +64,7 @@ QtProgressBar::ProcessEvent( itk::Object * caller, } } -void +void QtProgressBar::ConstProcessEvent( const itk::Object * caller, const itk::EventObject & event ) { diff --git a/Code/Wrappers/QtWidget/itkQtProgressBar.h b/Code/Wrappers/QtWidget/itkQtProgressBar.h index 8b87307833..daba4c66d6 100644 --- a/Code/Wrappers/QtWidget/itkQtProgressBar.h +++ b/Code/Wrappers/QtWidget/itkQtProgressBar.h @@ -9,7 +9,7 @@ Copyright (c) 2002 Insight Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. - This software is distributed WITHOUT ANY WARRANTY; without even + This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. -- GitLab