Commit 9c5db512 authored by Julien Malik's avatar Julien Malik

STYLE: remove trailing whitespace/tab from Code

parent 3bcf27cf
......@@ -34,7 +34,7 @@ namespace Wrapper
class ITK_EXPORT AddProcessToWatchEvent: public itk::EventObject
{
public:
typedef AddProcessToWatchEvent Self;
typedef itk::EventObject Superclass;
......@@ -68,7 +68,7 @@ public:
{
return new Self;
}
virtual const char* GetEventName() const
{
return "AddProcess";
......
......@@ -31,7 +31,7 @@ namespace Wrapper
oss << "</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;\"><p align=\"center\" style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:x-large; font-weight:600;\"><span style=\" font-size:x-large;\">"; \
oss << value; \
oss << "</span></p>";
#define otbDocHtmlTitle1Macro( value ) \
oss << "<p style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;\"><span style=\" font-size:large;\">"; \
oss << value; \
......@@ -79,7 +79,7 @@ void
ApplicationHtmlDocGenerator::GenerateDoc( const Application::Pointer app, std::string & val, const bool showKey )
{
std::ostringstream oss;
oss << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd\">";
oss << "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">";
oss << "p, li { white-space: pre-wrap; }";
......@@ -105,7 +105,7 @@ ApplicationHtmlDocGenerator::GenerateDoc( const Application::Pointer app, std::s
{
otbDocHtmlBodyMacro( "None" );
}
otbDocHtmlTitle1Macro("Long Description");
otbDocHtmlBodyMacro( app->GetDocLongDescription() );
......@@ -136,7 +136,7 @@ ApplicationHtmlDocGenerator::GenerateDoc( const Application::Pointer app, std::s
{
otbDocHtmlBodyMacro( "<li>Command line to execute:</li>" );
otbDocHtmlBodyCodeMacro( app->GetCLExample() );
oss << "</ul>";
}
oss << "</body></html>";
......@@ -151,7 +151,7 @@ void
ApplicationHtmlDocGenerator::GenerateDoc(const Application::Pointer app, const std::string& filename, const bool showKey)
{
std::string doc;
ApplicationHtmlDocGenerator::GenerateDoc( app, doc, showKey );
std::ofstream ofs(filename.c_str());
......@@ -169,7 +169,7 @@ void ApplicationHtmlDocGenerator::GetDocParameters( const Application::Pointer a
std::ostringstream oss;
const std::vector<std::string> appKeyList = app->GetParametersKeys( false );
const unsigned int nbOfParam = appKeyList.size();
std::string paramDocs("");
if( nbOfParam == 0)
{
......@@ -207,7 +207,7 @@ void ApplicationHtmlDocGenerator::GetDocParameters( const Application::Pointer a
}
}
}
val = oss.str();
}
......@@ -218,7 +218,7 @@ void ApplicationHtmlDocGenerator::GetDocParameterGroup( const Application::Point
{
itkGenericExceptionMacro("Invalid parameter type for key "<<key<<", wait for ParameterGroup...");
}
ParameterGroup * group = dynamic_cast<ParameterGroup *>(paramGr);
const std::vector<std::string> appKeyList = group->GetParametersKeys( false );
unsigned int nbOfParam = appKeyList.size();
......@@ -271,7 +271,7 @@ void ApplicationHtmlDocGenerator::GetDocParameterChoice( const Application::Poin
unsigned int nbOfParam = choice->GetNbChoices();
std::ostringstream oss;
oss<<"<ul>";
for( unsigned int i=0; i<nbOfParam; i++ )
{
const std::string fullKey(std::string(key).append(".").append(appKeyList[i]));
......
......@@ -41,7 +41,7 @@ ChoiceParameter::AddChoice( std::string choicekey, std::string choiceName )
choice.m_AssociatedParameter = ParameterGroup::New();
choice.m_AssociatedParameter->SetName(choiceName);
choice.m_AssociatedParameter->SetRoot(this);
m_ChoiceList.push_back(choice);
// check if the new choice matches the m_CurrentChoice : if so the group should be active.
......@@ -152,7 +152,7 @@ ChoiceParameter::SetValue(unsigned int v)
}
}
}
// Call Modified();
this->Modified();
}
......
......@@ -191,35 +191,35 @@ TOutputImage*
ComplexInputImageParameter::SimpleCastImage()
{
TComplexInputImage* realComplexInputImage = dynamic_cast<TComplexInputImage*>(m_Image.GetPointer());
typedef itk::CastImageFilter<TComplexInputImage, TOutputImage> CasterType;
typename CasterType::Pointer caster = CasterType::New();
caster->SetInput(realComplexInputImage);
caster->UpdateOutputInformation();
m_Image = caster->GetOutput();
m_Caster = caster;
return caster->GetOutput();
}
template <class TComplexInputImage, class TOutputImage>
TOutputImage*
ComplexInputImageParameter::CastVectorImageFromImage()
{
TComplexInputImage* realComplexInputImage = dynamic_cast<TComplexInputImage*>(m_Image.GetPointer());
typedef ImageToVectorImageCastFilter<TComplexInputImage, TOutputImage> CasterType;
typename CasterType::Pointer caster = CasterType::New();
caster->SetInput(realComplexInputImage);
caster->UpdateOutputInformation();
m_Image = caster->GetOutput();
m_Caster = caster;
return caster->GetOutput();
}
......
......@@ -71,7 +71,7 @@ public:
/** Set a templated image.*/
template <class TImageType>
void SetImage(TImageType* image);
/** Generic cast method that will be specified for each image type. */
template <class TComplexInputImage, class TOutputImage>
TOutputImage* CastImage()
......@@ -88,12 +88,12 @@ public:
/** Cast an image to a vector image. */
template <class TComplexInputImage, class TOutputImage>
TOutputImage* CastVectorImageFromImage();
bool HasValue() const;
void ClearValue();
protected:
/** Constructor */
ComplexInputImageParameter();
......
......@@ -132,7 +132,7 @@ ComplexOutputImageParameter::GetWriter()
int type = 0;
// 0 : image
// 1 : VectorImage
if ( dynamic_cast<FloatVectorImageType*>( m_Image.GetPointer()) ||
dynamic_cast<DoubleVectorImageType*>(m_Image.GetPointer()))
{
......
......@@ -71,7 +71,7 @@ public:
// GetActive method
otbGetObjectMemberConstMacro(StringParam, Active, bool);
protected:
/** Constructor */
DirectoryParameter()
......
......@@ -45,7 +45,7 @@ DocExampleStructure::AddParameter( const std::string key, const std::string valu
m_ParameterList.push_back(ParametersVectorType());
}
}
m_ParameterList.at(exId).push_back(std::make_pair(key, value));
}
......@@ -130,10 +130,10 @@ DocExampleStructure::GenerateCLExample( unsigned int exId )
}
else if ( m_ParameterList.at(exId).empty() )
return res;
std::ostringstream oss;
oss << "otbcli_" << m_ApplicationName << " ";
for (ParametersVectorType::const_iterator it = m_ParameterList.at(exId).begin();
it != m_ParameterList.at(exId).end(); ++it)
{
......@@ -142,12 +142,12 @@ DocExampleStructure::GenerateCLExample( unsigned int exId )
oss<< "-" << it->first << " " << it->second <<" ";
}
}
res = oss.str();
// Supress last added space
res.erase( res.size()-1, 1);
return res.c_str();
}
......@@ -162,7 +162,7 @@ DocExampleStructure::GenerateCLExample()
oss << this->GenerateCLExample( exId );
oss << std::endl;
}
std::string res = oss.str();
return res;
}
......@@ -175,7 +175,7 @@ DocExampleStructure::GenerateHtmlExample( unsigned int exId )
{
return "";
}
std::ostringstream oss;
oss << "<ul>";
......@@ -192,11 +192,11 @@ DocExampleStructure::GenerateHtmlExample( unsigned int exId )
}
}
oss << "</ul>";
std::string res = oss.str();
return res;
}
......@@ -206,7 +206,7 @@ DocExampleStructure::GenerateHtmlExample()
std::ostringstream oss;
if( m_NbOfExamples>1 )
oss << "<ul>";
for( unsigned int exId=0; exId<m_NbOfExamples; exId++)
{
if( m_NbOfExamples>1 )
......@@ -219,9 +219,9 @@ DocExampleStructure::GenerateHtmlExample()
}
if( m_NbOfExamples>1 )
oss << "</ul>";
std::string res = oss.str();
return res;
}
......
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
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.
=========================================================================*/
#ifndef __otbWrapperElevationParametersHandler_h
#define __otbWrapperElevationParametersHandler_h
......
......@@ -77,20 +77,20 @@ public:
/** Erase one element of the list. */
void Erase( unsigned int id );
/** Clear all the list. */
virtual void ClearValue();
protected:
/** Constructor */
InputFilenameListParameter();
/** Destructor */
virtual ~InputFilenameListParameter();
StringParameterListType::Pointer m_FilenameList;
private:
......
......@@ -45,15 +45,15 @@ public:
/** RTTI support */
itkTypeMacro(InputFilenameParameter, Parameter);
bool HasValue() const
{
return m_StringParam->HasValue();
}
// Get Value
otbGetObjectMemberMacro(StringParam, Value , std::string);
// Set Value
virtual void SetValue(const std::string value)
{
......@@ -62,21 +62,21 @@ public:
SetActive(true);
this->Modified();
}
// Clear Value
void ClearValue()
{
m_StringParam->ClearValue();
}
protected:
/** Constructor */
InputFilenameParameter()
{
// Initialize the String Parameter
m_StringParam= StringParameter::New();
}
/** Destructor */
......
......@@ -85,20 +85,20 @@ public:
/** Erase one element of the list. */
void Erase( unsigned int id );
/** Clear all the list. */
virtual void ClearValue();
protected:
/** Constructor */
InputImageListParameter();
/** Destructor */
virtual ~InputImageListParameter();
FloatVectorImageListType::Pointer m_ImageList;
ImageFileReaderListType::Pointer m_ReaderList;
......
......@@ -87,8 +87,8 @@ public:
/** Set a templated image.*/
template <class TImageType>
void SetImage(TImageType* image);
/** Generic cast method that will be specified for each image type. */
template <class TInputImage, class TOutputImage>
TOutputImage* CastImage()
......@@ -105,13 +105,13 @@ public:
/** Cast an image to a vector image. */
template <class TInputImage, class TOutputImage>
TOutputImage* CastVectorImageFromImage();
bool HasValue() const;
void ClearValue();
protected:
/** Constructor */
InputImageParameter();
......
......@@ -85,18 +85,18 @@ public:
/** Erase one element of the list. */
void Erase( unsigned int id );
/** Clear all the list. */
virtual void ClearValue();
protected:
/** Constructor */
InputVectorDataListParameter();
/** Destructor */
virtual ~InputVectorDataListParameter();
VectorDataListType::Pointer m_VectorDataList;
VectorDataFileReaderListType::Pointer m_ReaderList;
......
......@@ -97,7 +97,7 @@ InputVectorDataParameter::GetVectorData()
itkExceptionMacro("No input vector data or filename detected...");
}
}
return m_VectorData;
}
......
......@@ -32,7 +32,7 @@ void MapProjectionParametersHandler::AddMapProjectionParameters( Application::Po
{
app->AddParameter(ParameterType_Choice, key, "Output Cartographic Map Projection");
app->SetParameterDescription(key,"Parameters of the output map projection to be used.");
// utm
std::ostringstream oss;
oss << key<<".utm";
......@@ -44,7 +44,7 @@ void MapProjectionParametersHandler::AddMapProjectionParameters( Application::Po
app->SetParameterDescription(oss.str(),"The zone number ranges from 1 to 60 and allows to define the transverse mercator projection (along with the hemisphere)");
app->SetMinimumParameterIntValue(oss.str(), 1);
app->SetDefaultParameterInt(oss.str(), 31);