DGtal  0.9.3beta
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 >:
[legend]
Collaboration diagram for DGtal::functors::ConstValue< TValue >:
[legend]

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

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

Definition at line 180 of file BasicFunctors.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters
aValuethe constant value.

Definition at line 186 of file BasicFunctors.h.

187  :myValue(aValue) {};

Member Function Documentation

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

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

199  {
200  return myValue;
201  }

Field Documentation

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

value

Definition at line 207 of file BasicFunctors.h.

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


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