DGtal  1.0.0
Public Types | Public Member Functions | Private Attributes
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)
inline

Constructor.

Parameters
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
inline

Operator

Template Parameters
TInputtype of the input object
Returns
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
private

value

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: