kanzi::detail::ProfilerRegistrationHelper< TProfiler > Struct Template Reference

Registered profiler instance. More...

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

Public Types

typedef shared_ptr< TProfiler > ProfilerSharedPtr
 The profiler shared pointer type. More...
 

Public Member Functions

template<typename TRegistryType >
 ProfilerRegistrationHelper (TRegistryType &registry, ProfilerSharedPtr profiler)
 Constructor. More...
 

Public Attributes

ProfilerSharedPtr m_profiler
 The registered profiler. More...
 

Detailed Description

template<typename TProfiler>
struct kanzi::detail::ProfilerRegistrationHelper< TProfiler >

Registered profiler instance.

Do not use this structure directly. Profiling macros use it internally for profiling.

This template structure encapsulates shared pointer to the arbitrary profiler. It is used to create object of the profiler class and register it within the profiler registry in single expression. This is used in Profiling macros when profiling scope or function to create local static objects of the profiler.

Member Typedef Documentation

template<typename TProfiler >
typedef shared_ptr<TProfiler> kanzi::detail::ProfilerRegistrationHelper< TProfiler >::ProfilerSharedPtr

The profiler shared pointer type.

Constructor & Destructor Documentation

template<typename TProfiler >
template<typename TRegistryType >
kanzi::detail::ProfilerRegistrationHelper< TProfiler >::ProfilerRegistrationHelper ( TRegistryType &  registry,
ProfilerSharedPtr  profiler 
)
inlineexplicit

Constructor.

Registers new profiler withing profiler registry provided by you through registry. The shared pointer to the profiler is kept in stucture and is accessible through m_profiler.

Parameters
registryThe reference to the profiler registry where to add profiler.
profilerThe shared pointer to the profiler to add to new registry.

Member Data Documentation

template<typename TProfiler >
ProfilerSharedPtr kanzi::detail::ProfilerRegistrationHelper< TProfiler >::m_profiler

The registered profiler.


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