Commit b3e93bf9 authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch 'txx_to_hxx' into 'develop'

rename files with txx extension to hxx

See merge request orfeotoolbox/otb!152
parents 01f22368 11d9f46f

Too many changes to show.

To preserve performance only 392 of 392+ files are displayed.

......@@ -46,7 +46,7 @@ if(NOT OTB_USE_OPENCV)
SET(BANNED_HEADERS "${BANNED_HEADERS} otbDecisionTreeMachineLearningModelFactory.h otbDecisionTreeMachineLearningModel.h otbKNearestNeighborsMachineLearningModelFactory.h otbKNearestNeighborsMachineLearningModel.h otbRandomForestsMachineLearningModelFactory.h otbRandomForestsMachineLearningModel.h otbSVMMachineLearningModelFactory.h otbSVMMachineLearningModel.h otbGradientBoostedTreeMachineLearningModelFactory.h otbGradientBoostedTreeMachineLearningModel.h otbBoostMachineLearningModelFactory.h otbBoostMachineLearningModel.h otbNeuralNetworkMachineLearningModelFactory.h otbNeuralNetworkMachineLearningModel.h otbNormalBayesMachineLearningModelFactory.h otbNormalBayesMachineLearningModel.h otbRequiresOpenCVCheck.h otbOpenCVUtils.h otbCvRTreesWrapper.h")
endif()
if(NOT OTB_USE_SHARK)
SET(BANNED_HEADERS "${BANNED_HEADERS} otbSharkRandomForestsMachineLearningModel.h otbSharkRandomForestsMachineLearningModel.txx otbSharkUtils.h otbRequiresSharkCheck.h otbSharkRandomForestsMachineLearningModelFactory.h otbSharkKMeansMachineLearningModel.h otbSharkKMeansMachineLearningModel.txx otbSharkKMeansMachineLearningModelFactory.h otbSharkKMeansMachineLearningModelFactory.txx")
SET(BANNED_HEADERS "${BANNED_HEADERS} otbSharkRandomForestsMachineLearningModel.h otbSharkRandomForestsMachineLearningModel.hxx otbSharkUtils.h otbRequiresSharkCheck.h otbSharkRandomForestsMachineLearningModelFactory.h otbSharkKMeansMachineLearningModel.h otbSharkKMeansMachineLearningModel.hxx otbSharkKMeansMachineLearningModelFactory.h otbSharkKMeansMachineLearningModelFactory.hxx")
endif()
if(NOT OTB_USE_LIBSVM)
SET(BANNED_HEADERS "${BANNED_HEADERS} otbLibSVMMachineLearningModel.h otbLibSVMMachineLearningModelFactory.h")
......
......@@ -2,7 +2,7 @@
#
#
# This Script is used to infer figure dependencies from the .cxx/.txx source
# This Script is used to infer figure dependencies from the .cxx/.hxx source
# files in the Insight/Examples directory.
#
# This automatic generation mechanism guaranties that the figures
......@@ -77,7 +77,7 @@ $numArgs = $#ARGV + 1;
if( $numArgs < 5 )
{
print "Usage arguments: \n";
print " Name of the .cxx/.txx file (with extension).\n";
print " Name of the .cxx/.hxx file (with extension).\n";
print " OTBExecsDirectoryPath \n";
print " Cmake file to be generated\n";
print " Name of the TEX file generated, so dependencies can be specified\n";
......@@ -121,7 +121,7 @@ sub GetArgsAndFilenames {
#Exec file anme is assumed to be the same as the source filename
my $volume; my $directories;
($volume,$directories,$inputsourcefile) = File::Spec->splitpath( $inputfilename );
$inputsourcefile =~ m/(.*)(\.cxx|\.CXX|\.txx|\.TXX)/;
$inputsourcefile =~ m/(.*)(\.cxx|\.CXX|\.hxx|\.HXX)/;
my $execfilenamebase = $1;
#If the paths have a trailing /, remove it.
......
......@@ -200,7 +200,7 @@ aware of.
\url{http://www.orfeo-toolbox.org/doxygen/}.
\item[Header Files.] Each OTB class is implemented with a .h and
.cxx/.txx file (.txx file for templated classes). All methods
.cxx/.hxx file (.hxx file for templated classes). All methods
found in the .h header files are documented and provide a quick way
to find documentation for a particular method. (Indeed, Doxygen uses
the header documentation to produces its output.)
......
......@@ -397,15 +397,15 @@ tasks more efficient or easier to implement.
%./Common/itkFloodFilledFunctionConditionalIterator.h (BaseClass)
%[ here are all classes where these filters are used:
% ./BasicFilters/itkConfidenceConnectedImageFilter.txx (ImageFunction)
% ./BasicFilters/itkConnectedThresholdImageFilter.txx (ImageFunction)
% ./BasicFilters/itkIsolatedConnectedImageFilter.txx (ImageFunction)
% ./BasicFilters/itkNeighborhoodConnectedImageFilter.txx (ImageFunction)
% ./BasicFilters/itkConfidenceConnectedImageFilter.hxx (ImageFunction)
% ./BasicFilters/itkConnectedThresholdImageFilter.hxx (ImageFunction)
% ./BasicFilters/itkIsolatedConnectedImageFilter.hxx (ImageFunction)
% ./BasicFilters/itkNeighborhoodConnectedImageFilter.hxx (ImageFunction)
%
% ./Common/itkBinaryBallStructuringElement.txx (SpatialFunction)
% ./Common/itkBloxCoreAtomImage.txx (SpatialFunction)
% ./BasicFilters/itkBloxBoundaryPointToCoreAtomImageFilter.txx (SpatialFunction)
% ./BasicFilters/itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx (SpatialFunction)
% ./Common/itkBinaryBallStructuringElement.hxx (SpatialFunction)
% ./Common/itkBloxCoreAtomImage.hxx (SpatialFunction)
% ./BasicFilters/itkBloxBoundaryPointToCoreAtomImageFilter.hxx (SpatialFunction)
% ./BasicFilters/itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.hxx (SpatialFunction)
%]
%\subsection{itk::FloodFilledImageFunctionConditionalIterator}
......
......@@ -152,7 +152,7 @@ simplest syntax errors.
In ITK and OTB classes are defined by a maximum of two files: a header \code{.h} file
and an implementation file---\code{.cxx} if a non-templated class, and a
\code{.txx} if a templated class.
\code{.hxx} if a templated class.
The header files contain class declarations
and formatted comments that are used by the Doxygen documentation
system to automatically produce HTML manual pages.
......
......@@ -521,12 +521,12 @@ defaults (usually zero) for all parameters. The copy constructor and
assignment operator should be declared \code{private} and not implemented,
to prevent instantiating the filter without the factory methods (above).
Finally, the template implementation code (in the \code{.txx} file) should
Finally, the template implementation code (in the \code{.hxx} file) should
be included, bracketed by a test for manual instantiation, thus:
\begin{verbatim}
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkExampleFilter.txx"
#include "itkExampleFilter.hxx"
#endif
\end{verbatim}
......
......@@ -85,7 +85,7 @@ if(NOT OTB_SOURCE_DIR)
\section{The include folder}
The include folder will contain all your headers (*.h files) and template method boy files (*.txx or *.hxx). It does not require any additional file (in particular, no CMakeLists.txt file is required).
The include folder will contain all your headers (*.h files) and template method boy files (*.hxx or *.hxx). It does not require any additional file (in particular, no CMakeLists.txt file is required).
\section{The src folder }
......
......@@ -152,7 +152,7 @@ private:
// Software Guide : BeginLatex
//
// Pay attention to the fact that no \code{.txx} file is needed, since
// Pay attention to the fact that no \code{.hxx} file is needed, since
// filtering operation is implemented in the
// \doxygen{otb}{BinaryFunctorNeighborhoodImageFilter} class. So all
// the algorithmics part is inside the functor.
......
......@@ -61,7 +61,7 @@ std::ostream & Join(std::ostream &os, TRange const& range, std::string const& se
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
// #include "otbJoinContainer.txx"
// #include "otbJoinContainer.hxx"
#endif
#endif // otbJoinContainer_h
......@@ -172,7 +172,7 @@ private:
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
// #include "otbGeometriesSet.txx"
// #include "otbGeometriesSet.hxx"
#endif
#endif // otbGeometriesSet_h
......@@ -394,7 +394,7 @@ protected:
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbGeometriesToGeometriesFilter.txx"
#include "otbGeometriesToGeometriesFilter.hxx"
#endif
#endif // otbGeometriesToGeometriesFilter_h
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbGeometriesToGeometriesFilter_hxx
#define otbGeometriesToGeometriesFilter_hxx
/*===========================================================================*/
/*===============================[ Includes ]================================*/
/*===========================================================================*/
#include "otbGeometriesToGeometriesFilter.h"
/*===========================================================================*/
/*==================[ DefaultGeometriesToGeometriesFilter ]==================*/
/*===========================================================================*/
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
otb::DefaultGeometriesToGeometriesFilter<TransformationFunctor, FieldTransformationPolicy>::DefaultGeometriesToGeometriesFilter()
{}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
/*virtual*/
otb::DefaultGeometriesToGeometriesFilter<TransformationFunctor, FieldTransformationPolicy>::~DefaultGeometriesToGeometriesFilter()
{}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
/*virtual*/
void otb::DefaultGeometriesToGeometriesFilter<TransformationFunctor, FieldTransformationPolicy>::DoProcessLayer(
otb::ogr::Layer const& source, otb::ogr::Layer & destination) const
{
if (source != destination)
{
(*this)(source, destination); // if TransformedElementType == layer
// m_TransformationFunctor(source, destination); // if TransformedElementType == layer
}
else
{
// m_TransformationFunctor(destination); // if TransformedElementType == layer
(*this)(destination); // if TransformedElementType == layer
}
}
/*===========================================================================*/
/*================[ TransformationFunctorDispatcher<layer> ]=================*/
/*===========================================================================*/
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,otb::ogr::Layer,FieldTransformationPolicy>::operator()(
otb::ogr::Layer const& in, otb::ogr::Layer & out) const
{
m_functor(in, out);
}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,otb::ogr::Layer,FieldTransformationPolicy>::operator()(
otb::ogr::Layer & inout) const
{
m_functor(inout);
}
/*===========================================================================*/
/*=============[ TransformationFunctorDispatcher<OGRGeometry> ]==============*/
/*===========================================================================*/
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,OGRGeometry,FieldTransformationPolicy>::operator()(
otb::ogr::Layer const& in, otb::ogr::Layer & out) const
{
OGRFeatureDefn & defn = out.GetLayerDefn();
for (ogr::Layer::const_iterator b = in.begin(), e = in.end(); b != e; ++b)
{
ogr::Feature const feat = *b;
ogr::UniqueGeometryPtr g = m_functor(feat.GetGeometry());
ogr::Feature dest(defn);
dest.SetGeometryDirectly(otb::move(g));
this->fieldsTransform(feat, dest);
out.CreateFeature(dest);
}
}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,OGRGeometry,FieldTransformationPolicy>::operator()(
otb::ogr::Layer & inout) const
{
// OGRFeatureDefn & defn = inout.GetLayerDefn();
// NB: We can't iterate with begin()/end() as SetFeature may invalidate the
// iterators depending of the underlying drivers
// => we use start_at(), i.e. SetNextByIndex()
for (int i=0, N=inout.GetFeatureCount(true); i!=N; ++i)
{
ogr::Feature feat = *inout.start_at(i);
this->fieldsTransform(feat);
ogr::UniqueGeometryPtr g = m_functor(feat.GetGeometry());
feat.SetGeometryDirectly(otb::move(g));
inout.SetFeature(feat);
}
}
#endif
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbGeometriesToGeometriesFilter_txx
#define otbGeometriesToGeometriesFilter_txx
/*===========================================================================*/
/*===============================[ Includes ]================================*/
/*===========================================================================*/
#include "otbGeometriesToGeometriesFilter.h"
/*===========================================================================*/
/*==================[ DefaultGeometriesToGeometriesFilter ]==================*/
/*===========================================================================*/
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
otb::DefaultGeometriesToGeometriesFilter<TransformationFunctor, FieldTransformationPolicy>::DefaultGeometriesToGeometriesFilter()
{}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
/*virtual*/
otb::DefaultGeometriesToGeometriesFilter<TransformationFunctor, FieldTransformationPolicy>::~DefaultGeometriesToGeometriesFilter()
{}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
/*virtual*/
void otb::DefaultGeometriesToGeometriesFilter<TransformationFunctor, FieldTransformationPolicy>::DoProcessLayer(
otb::ogr::Layer const& source, otb::ogr::Layer & destination) const
{
if (source != destination)
{
(*this)(source, destination); // if TransformedElementType == layer
// m_TransformationFunctor(source, destination); // if TransformedElementType == layer
}
else
{
// m_TransformationFunctor(destination); // if TransformedElementType == layer
(*this)(destination); // if TransformedElementType == layer
}
}
/*===========================================================================*/
/*================[ TransformationFunctorDispatcher<layer> ]=================*/
/*===========================================================================*/
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,otb::ogr::Layer,FieldTransformationPolicy>::operator()(
otb::ogr::Layer const& in, otb::ogr::Layer & out) const
{
m_functor(in, out);
}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,otb::ogr::Layer,FieldTransformationPolicy>::operator()(
otb::ogr::Layer & inout) const
{
m_functor(inout);
}
/*===========================================================================*/
/*=============[ TransformationFunctorDispatcher<OGRGeometry> ]==============*/
/*===========================================================================*/
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,OGRGeometry,FieldTransformationPolicy>::operator()(
otb::ogr::Layer const& in, otb::ogr::Layer & out) const
{
OGRFeatureDefn & defn = out.GetLayerDefn();
for (ogr::Layer::const_iterator b = in.begin(), e = in.end(); b != e; ++b)
{
ogr::Feature const feat = *b;
ogr::UniqueGeometryPtr g = m_functor(feat.GetGeometry());
ogr::Feature dest(defn);
dest.SetGeometryDirectly(otb::move(g));
this->fieldsTransform(feat, dest);
out.CreateFeature(dest);
}
}
template <class TransformationFunctor, class FieldTransformationPolicy>
inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,OGRGeometry,FieldTransformationPolicy>::operator()(
otb::ogr::Layer & inout) const
{
// OGRFeatureDefn & defn = inout.GetLayerDefn();
// NB: We can't iterate with begin()/end() as SetFeature may invalidate the
// iterators depending of the underlying drivers
// => we use start_at(), i.e. SetNextByIndex()
for (int i=0, N=inout.GetFeatureCount(true); i!=N; ++i)
{
ogr::Feature feat = *inout.start_at(i);
this->fieldsTransform(feat);
ogr::UniqueGeometryPtr g = m_functor(feat.GetGeometry());
feat.SetGeometryDirectly(otb::move(g));
inout.SetFeature(feat);
}
}
#endif
......@@ -173,7 +173,7 @@ private:
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
// #include "otbImageReference.txx"
// #include "otbImageReference.hxx"
#endif
#endif // otbImageReference_h
......@@ -572,7 +572,7 @@ namespace boost { namespace foreach {
#endif
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbOGRDataSourceWrapper.txx"
#include "otbOGRDataSourceWrapper.hxx"
#endif
#endif // otbOGRDataSourceWrapper_h
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**\ingroup Geometry
* \file otbOGRDataSourceWrapper.hxx
* \internal this file is meant to be included by otbOGRDataSourceWrapper.h
*/
#ifndef otbOGRDataSourceWrapper_hxx
#define otbOGRDataSourceWrapper_hxx
#include "otbOGRDataSourceWrapper.h"
/*===========================================================================*/
/*===============================[ Includes ]================================*/
/*===========================================================================*/
#include <cassert>
#include "itkMacro.h" // itk::ExceptionObject
#include "ogrsf_frmts.h" // OGRDataSource & OGRLayer
/*===========================================================================*/
/*=========================[ otb::ogr::DataSource ]==========================*/
/*===========================================================================*/
// These function definitions are inline so assert() will be expanded according
// to the compilation mode of the client code.
inline
otb::ogr::version_proxy::GDALDatasetType & otb::ogr::DataSource::ogr()
{
assert(m_DataSource && "GDALDataset not initialized");
return *m_DataSource;
}
inline
otb::ogr::Layer otb::ogr::DataSource::GetLayer(size_t i)
{
assert(int(i) < GetLayersCount() && "Out-of-range index");
OGRLayer * layer_ptr = GetLayerUnchecked(i);
assert(layer_ptr && "No layer returned by OGR");
return otb::ogr::Layer(layer_ptr, IsLayerModifiable(i));
}
inline
otb::ogr::Layer const otb::ogr::DataSource::GetLayer(size_t i) const
{
return const_cast <DataSource*>(this)->GetLayer(i);
}
inline
otb::ogr::Layer const otb::ogr::DataSource::GetLayer(std::string const& name) const
{
return const_cast <DataSource*>(this)->GetLayer(name);
}
inline
otb::ogr::Layer const otb::ogr::DataSource::GetLayerChecked(size_t i) const
{
return const_cast <DataSource*>(this)->GetLayerChecked(i);
}
inline
OGRLayer* otb::ogr::DataSource::GetLayerUnchecked(size_t i) const
{
return const_cast <DataSource*>(this)->GetLayerUnchecked(i);
}
/*===========================================================================*/
/*====================[ otb::ogr::DataSource/iterators ]=====================*/
/*===========================================================================*/
template <class Value>
otb::ogr::DataSource::layer_iter<Value>::layer_iter(container_type & datasource, size_t index)
: m_DataSource(&datasource), m_index(index)
{}
template <class Value>
otb::ogr::DataSource::layer_iter<Value>::layer_iter()
: m_DataSource(0), m_index(0)
{}