diff --git a/Modules/Core/Functor/include/otbVariadicAddFunctor.h b/Modules/Core/Functor/include/otbVariadicAddFunctor.h index 61d687146c253d89ee6aaf12f641b2be9cdbfd81..cc0030d21513864a1d9aeff0f278bb7f2888fbe5 100644 --- a/Modules/Core/Functor/include/otbVariadicAddFunctor.h +++ b/Modules/Core/Functor/include/otbVariadicAddFunctor.h @@ -28,7 +28,10 @@ namespace otb namespace Functor { - +/** + * \class VariadicAdd + * \brief This functor adds any number of compile time scalar inputs + */ template <typename TOut, typename ...TIns> struct VariadicAdd { auto operator()(TIns... ins) const diff --git a/Modules/Core/Functor/include/otbVariadicConcatenateFunctor.h b/Modules/Core/Functor/include/otbVariadicConcatenateFunctor.h index d1bb0c99808b6a8120699849c53c3fa900085536..4cff7f504b61e950473f5ce1f328e6aac43b03fd 100644 --- a/Modules/Core/Functor/include/otbVariadicConcatenateFunctor.h +++ b/Modules/Core/Functor/include/otbVariadicConcatenateFunctor.h @@ -33,7 +33,7 @@ namespace Functor { -namespace internal +namespace variadic_concatenate_details { // helper function to implement next functor (convert a scalar value // to a VariableLengthVector) @@ -70,17 +70,23 @@ template <typename v1, typename v2, typename ...vn> void concatenateVectors(v1 & concatenateVectors(a,b); concatenateVectors(a,z...); } -} // end namespace internal +} // end namespace variadic_concatenate_details // N images (all types) -> vector image // This functor concatenates N images (N = variadic) of type // VectorImage and or Image, into a single VectorImage + +/** + * \class VariadicConcatenate + * \brief This functor concatenates any number of input of scalar type + * or VariableLengthVector. + */ template<typename TOut, typename ...TIns> struct VariadicConcatenate { auto operator()(const TIns &... ins) const { itk::VariableLengthVector<TOut> out; - internal::concatenateVectors(out, internal::toVector(ins)...); + variadic_concatenate_details::concatenateVectors(out, internal::toVector(ins)...); return out; }