Kanzi  3.9.6
Kanzi Engine API
kanzi::ProfilingCategory Class Reference

Represents the runtime state of the profiling category. More...

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

Public Member Functions

FixedString getName () const
 Gets the name of a profiling category. More...
 
bool isEnabled () const
 Checks whether a profiling category is enabled. More...
 
void resetEnabledToInitial ()
 Resets the profiling category to its initial runtime state. More...
 
void setEnabled (bool enabled)
 Enables or disables the profiling category. More...
 

Static Public Member Functions

static ProfilingCategorycreate (FixedString name, bool initialEnabled)
 Creates a new profiling category. More...
 
static ProfilingCategoryfindByName (string_view name)
 Looks up a profiling category by its name. More...
 
static void resetAllEnabledToInitial ()
 Resets all profiling categories to their initial runtime state. More...
 
static void setAllEnabled (bool enabled)
 Enables or disables all profiling categories. More...
 
static void setFilter (string_view filterConfiguration)
 Sets the category filter. More...
 

Detailed Description

Represents the runtime state of the profiling category.

Member Function Documentation

◆ create()

static ProfilingCategory& kanzi::ProfilingCategory::create ( FixedString  name,
bool  initialEnabled 
)
static

Creates a new profiling category.

Do not call this function directly.

This function is used to create a new profiling category object. The name you provide in the name parameter should be unique for each category. The function raises an exception if a category with the given name already exists.

Parameters
nameThe name of the new category.
initialEnabledThe initial runtime state of the category.
Returns
The reference to new profiling category.

◆ setFilter()

static void kanzi::ProfilingCategory::setFilter ( string_view  filterConfiguration)
static

Sets the category filter.

Do not call this function directly.

Parameters
filterConfigurationFilter configuration string.

◆ findByName()

static ProfilingCategory* kanzi::ProfilingCategory::findByName ( string_view  name)
static

Looks up a profiling category by its name.

Use profiling category name you provided in name to look up created profiling category. See create() for details.

Parameters
nameThe name of the profiling category to look up.
Returns
Pointer to the profiling category object, 0 if category was not found.

◆ setEnabled()

void kanzi::ProfilingCategory::setEnabled ( bool  enabled)
inline

Enables or disables the profiling category.

Parameters
enabledWhether to enable or disable the category.

◆ resetEnabledToInitial()

void kanzi::ProfilingCategory::resetEnabledToInitial ( )
inline

Resets the profiling category to its initial runtime state.

◆ setAllEnabled()

static void kanzi::ProfilingCategory::setAllEnabled ( bool  enabled)
static

Enables or disables all profiling categories.

Parameters
enabledWhether to enable or disable all categories.

◆ resetAllEnabledToInitial()

static void kanzi::ProfilingCategory::resetAllEnabledToInitial ( )
static

Resets all profiling categories to their initial runtime state.

◆ getName()

FixedString kanzi::ProfilingCategory::getName ( ) const
inline

Gets the name of a profiling category.

Returns
Category name.

◆ isEnabled()

bool kanzi::ProfilingCategory::isEnabled ( ) const
inline

Checks whether a profiling category is enabled.

Returns
True if the category is enabled, otherwise false.

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