kanzi::FunctionWrapper Class Reference

A class that can be used to wrap a function object and connect it to a function profiler. More...

#include <kanzi/core/profiling/function_profiler_source.hpp>

Inheritance diagram for kanzi::FunctionWrapper:
kanzi::FunctionProfilerInstance

Public Member Functions

 FunctionWrapper (Profiler &profiler, string_view name, string_view category, size_t measurementBufferSize, function< void()> function)
 Constructor. More...
 
void operator() ()
 Override operator () to act as a functor. More...
 
- Public Member Functions inherited from kanzi::FunctionProfilerInstance
 FunctionProfilerInstance (Profiler &profiler, string_view name, string_view category, size_t sampleBufferSize)
 Constructor. More...
 
FunctionProfilerSourceget ()
 Provides access to the function profiling source that is managed by this object. More...
 

Detailed Description

A class that can be used to wrap a function object and connect it to a function profiler.

The wrapper object is a functor and can be used in place of the function object.

Constructor & Destructor Documentation

kanzi::FunctionWrapper::FunctionWrapper ( Profiler profiler,
string_view  name,
string_view  category,
size_t  measurementBufferSize,
function< void()>  function 
)

Constructor.

Parameters
profilerThe profiler instance this function profiler is connected in to.
nameName of the function.
categoryCategory of the function that is being profiled.
sampleBufferSizeSize of the sample ring buffer that is used to store more detailed per-invocation data.
functionThe function to wrap.

Member Function Documentation

void kanzi::FunctionWrapper::operator() ( )
inline

Override operator () to act as a functor.


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