DGtal  0.9.4beta
Public Member Functions
DGtal::functors::Pair2ndMutator< 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::Pair2ndMutator< 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 'Pair2ndMutator'

Template Parameters
ReturnTypetype of the first member of the pair

Definition at line 734 of file BasicFunctors.h.

Member Function Documentation

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

Operator

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

Definition at line 748 of file BasicFunctors.h.

749  {
750  return aPair.second;
751  }
template<typename ReturnType>
template<typename TPair >
const ReturnType& DGtal::functors::Pair2ndMutator< ReturnType >::operator() ( const TPair &  aPair) const
inline

Operator

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

Definition at line 763 of file BasicFunctors.h.

764  {
765  return aPair.second;
766  }

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