DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::functors::ConstValueCell< TQuantity, TCell > Class Template Reference

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

#include <DGtal/base/BasicFunctors.h>

Public Types

typedef TCell Cell
 
typedef TQuantity Quantity
 

Public Member Functions

 ConstValueCell (const Quantity &aQuantity=0)
 
Quantity operator() (const Cell &) const
 

Private Attributes

Quantity myQuantity
 

Detailed Description

template<typename TQuantity, typename TCell>
class DGtal::functors::ConstValueCell< TQuantity, TCell >

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

Description of template class 'ConstValueCell'

Template Parameters
TQuantitytype of the quantity
TCelltype of the cell

Definition at line 353 of file BasicFunctors.h.

Member Typedef Documentation

◆ Cell

template<typename TQuantity , typename TCell >
typedef TCell DGtal::functors::ConstValueCell< TQuantity, TCell >::Cell

Definition at line 356 of file BasicFunctors.h.

◆ Quantity

template<typename TQuantity , typename TCell >
typedef TQuantity DGtal::functors::ConstValueCell< TQuantity, TCell >::Quantity

Definition at line 357 of file BasicFunctors.h.

Constructor & Destructor Documentation

◆ ConstValueCell()

template<typename TQuantity , typename TCell >
DGtal::functors::ConstValueCell< TQuantity, TCell >::ConstValueCell ( const Quantity aQuantity = 0)
inline

Constructor.

Parameters
aQuantitythe constant quantity.

Definition at line 363 of file BasicFunctors.h.

364 :myQuantity(aQuantity) {}

Member Function Documentation

◆ operator()()

template<typename TQuantity , typename TCell >
Quantity DGtal::functors::ConstValueCell< TQuantity, TCell >::operator() ( const Cell ) const
inline

Operator

Returns
the constant value.

Definition at line 372 of file BasicFunctors.h.

373 {
374 return myQuantity;
375 }

References DGtal::functors::ConstValueCell< TQuantity, TCell >::myQuantity.

Field Documentation

◆ myQuantity

template<typename TQuantity , typename TCell >
Quantity DGtal::functors::ConstValueCell< TQuantity, TCell >::myQuantity
private

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