![]() |
DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
|
Generic class that wraps and counts calls of an arbitrary callback. More...
#include <dbpp_SimulationUtilities.hpp>
Public Member Functions | |
| callCounter (CB aCallBack) | |
| Ctor enables deduction of calback type as the template parameter. | |
| template<typename ... Args> | |
| decltype(auto) | operator() (Args &&...args) |
| call function | |
| long | count () const |
| Counter. | |
Private Attributes | |
| CB | m_callBack |
| long | m_count {} |
| std::atomic_long | m_parCounter {} |
Generic class that wraps and counts calls of an arbitrary callback.
| CB | callback function type NOTE Can instantiate with the type of a lambda (the closure type of a lambda) callCounter<TypeOfTheLambda> |
|
inline |
Ctor enables deduction of calback type as the template parameter.
| aCallBack | callback function to be called |
|
inline |
Counter.
|
inline |
call function
| ...Args | parameter pack |
| ...args | pack expansion |
|
private |
callnack function
|
private |
counter
|
private |
parallel execution