DGtal  1.5.beta
DGtal::functors::ConstValue< TValue > Class Template Reference

Aim: Define a simple functor that returns a constant value (0 by default). More...

#include <DGtal/base/BasicFunctors.h>

Public Types

typedef TValue Value

Public Member Functions

 ConstValue (const Value &aValue=0)
template<typename TInput >
Value operator() (const TInput &) const

Private Attributes

Value myValue

Detailed Description

template<typename TValue>
class DGtal::functors::ConstValue< TValue >

Aim: Define a simple functor that returns a constant value (0 by default).

Description of template class 'ConstValue'

Template Parameters
TValuetype of the value

Definition at line 310 of file BasicFunctors.h.

Member Typedef Documentation

◆ Value

template<typename TValue >
typedef TValue DGtal::functors::ConstValue< TValue >::Value

Definition at line 313 of file BasicFunctors.h.

Constructor & Destructor Documentation

◆ ConstValue()

template<typename TValue >
DGtal::functors::ConstValue< TValue >::ConstValue ( const Value aValue = 0)


aValuethe constant value.

Definition at line 319 of file BasicFunctors.h.

320  :myValue(aValue) {};

Member Function Documentation

◆ operator()()

template<typename TValue >
template<typename TInput >
Value DGtal::functors::ConstValue< TValue >::operator() ( const TInput &  ) const


Template Parameters
TInputtype of the input object
the constant value.

Definition at line 331 of file BasicFunctors.h.

332  {
333  return myValue;
334  }

References DGtal::functors::ConstValue< TValue >::myValue.

Field Documentation

◆ myValue

template<typename TValue >
Value DGtal::functors::ConstValue< TValue >::myValue


Definition at line 340 of file BasicFunctors.h.

Referenced by DGtal::functors::ConstValue< TValue >::operator()().

The documentation for this class was generated from the following file: