All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Public Member Functions | List of all members
paal::utils::counting_functor_adaptor< Functor, CounterType > Class Template Reference

Counts number of calls. More...

#include <functors.hpp>

Public Member Functions

 counting_functor_adaptor (Functor f, CounterType &cnt)
 Constructor. More...
 
template<typename... Args>
auto operator() (Args &&...args) -> decltype(std::declval< Functor >()(std::forward< Args >(args)...))
 increments the counter and checks if the given limit is reached. More...
 

Detailed Description

template<typename Functor, typename CounterType = int>
class paal::utils::counting_functor_adaptor< Functor, CounterType >

Counts number of calls.

Template Parameters
Functor
CounterType

Definition at line 276 of file functors.hpp.

Constructor & Destructor Documentation

template<typename Functor , typename CounterType = int>
paal::utils::counting_functor_adaptor< Functor, CounterType >::counting_functor_adaptor ( Functor  f,
CounterType &  cnt 
)
inline

Constructor.

Parameters
cntcount reference
ffunctor

Definition at line 284 of file functors.hpp.

Member Function Documentation

template<typename Functor , typename CounterType = int>
template<typename... Args>
auto paal::utils::counting_functor_adaptor< Functor, CounterType >::operator() ( Args &&...  args) -> decltype(std::declval<Functor>()(std::forward<Args>(args)...))
inline

increments the counter and checks if the given limit is reached.

Template Parameters
Args
Returns

Definition at line 295 of file functors.hpp.


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