Skip to content
Snippets Groups Projects
Commit 894e496f authored by Julien Michel's avatar Julien Michel
Browse files

DOC: Enhance doc of separate functors

parent fdd99a96
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,10 @@ namespace otb ...@@ -28,7 +28,10 @@ namespace otb
namespace Functor namespace Functor
{ {
/**
* \class VariadicAdd
* \brief This functor adds any number of compile time scalar inputs
*/
template <typename TOut, typename ...TIns> struct VariadicAdd template <typename TOut, typename ...TIns> struct VariadicAdd
{ {
auto operator()(TIns... ins) const auto operator()(TIns... ins) const
......
...@@ -33,7 +33,7 @@ namespace Functor ...@@ -33,7 +33,7 @@ namespace Functor
{ {
namespace internal namespace variadic_concatenate_details
{ {
// helper function to implement next functor (convert a scalar value // helper function to implement next functor (convert a scalar value
// to a VariableLengthVector) // to a VariableLengthVector)
...@@ -70,17 +70,23 @@ template <typename v1, typename v2, typename ...vn> void concatenateVectors(v1 & ...@@ -70,17 +70,23 @@ template <typename v1, typename v2, typename ...vn> void concatenateVectors(v1 &
concatenateVectors(a,b); concatenateVectors(a,b);
concatenateVectors(a,z...); concatenateVectors(a,z...);
} }
} // end namespace internal } // end namespace variadic_concatenate_details
// N images (all types) -> vector image // N images (all types) -> vector image
// This functor concatenates N images (N = variadic) of type // This functor concatenates N images (N = variadic) of type
// VectorImage and or Image, into a single VectorImage // 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 template<typename TOut, typename ...TIns> struct VariadicConcatenate
{ {
auto operator()(const TIns &... ins) const auto operator()(const TIns &... ins) const
{ {
itk::VariableLengthVector<TOut> out; itk::VariableLengthVector<TOut> out;
internal::concatenateVectors(out, internal::toVector(ins)...); variadic_concatenate_details::concatenateVectors(out, internal::toVector(ins)...);
return out; return out;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment