DGtal  0.9.3
Public Types | Public Member Functions | Private Attributes
DGtal::functors::ConstValue< TValue > Class Template Reference

#include <DGtal/base/BasicFunctors.h>

Inheritance diagram for DGtal::functors::ConstValue< TValue >:
Collaboration diagram for DGtal::functors::ConstValue< TValue >:

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 177 of file BasicFunctors.h.

Member Typedef Documentation

◆ Value

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

Definition at line 180 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 186 of file BasicFunctors.h.

187  :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 198 of file BasicFunctors.h.

199  {
200  return myValue;
201  }

Field Documentation

◆ myValue

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


Definition at line 207 of file BasicFunctors.h.

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