DGtal  0.9.3beta
Public Member Functions
DGtal::functors::Pair1stMutator< ReturnType > Class Template Reference

#include <DGtal/base/BasicFunctors.h>

Public Member Functions

template<typename TPair >
ReturnType & operator() (TPair &aPair) const
 
template<typename TPair >
const ReturnType & operator() (const TPair &aPair) const
 

Detailed Description

template<typename ReturnType>
class DGtal::functors::Pair1stMutator< ReturnType >

Aim: Define a simple unary functor that returns a reference on the first member of a pair in order to update it.

Description of template class 'Pair1stMutator'

Template Parameters
ReturnTypetype of the first member of the pair

Definition at line 689 of file BasicFunctors.h.

Member Function Documentation

template<typename ReturnType >
template<typename TPair >
ReturnType& DGtal::functors::Pair1stMutator< ReturnType >::operator() ( TPair &  aPair) const
inline

Operator

Template Parameters
TPairmodel of CPair
Parameters
aPairinput pair
Returns
reference on the first member of aPair.

Definition at line 703 of file BasicFunctors.h.

704  {
705  return aPair.first;
706  }
template<typename ReturnType >
template<typename TPair >
const ReturnType& DGtal::functors::Pair1stMutator< ReturnType >::operator() ( const TPair &  aPair) const
inline

Operator

Template Parameters
TPairmodel of CPair
Parameters
aPairinput pair
Returns
constant reference on the first member of aPair.

Definition at line 718 of file BasicFunctors.h.

719  {
720  return aPair.first;
721  }

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