kanzi::ProfilingCategory Class Reference

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

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

Public Member Functions

void setEnabled (bool enabled)
 Enables or disables the profiling category. More...
 
void setShownInHUD (bool shownInHUD)
 Shows or hides the profiling category in the HUD. More...
 
FixedString getName () const
 Gets the name of a profiling category. More...
 
bool isEnabled () const
 Checks whether a profiling category is enabled. More...
 
bool isShownInHUD () const
 To check if the category is shown in the HUD, use isShownInHUD(). More...
 

Static Public Member Functions

static ProfilingCategorycreate (FixedString name, bool enabled)
 Creates a new profiling category. More...
 
static void setFilter (string_view filterConfiguration)
 Sets the category filter. More...
 
static ProfilingCategoryfindByName (string_view name)
 Looks up a profiling category by its name. More...
 
static void setAllEnabled (bool enabled)
 Enables or disables all profiling categories. More...
 
static void setAllShownInHUD (bool shownInHUD)
 Shows or hides all profiling categories in the HUD. More...
 

Detailed Description

Represents the runtime state of the profiling category.

Member Function Documentation

static ProfilingCategory& kanzi::ProfilingCategory::create ( FixedString  name,
bool  enabled 
)
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.
enabledThe initial runtime state of the category.
Returns
The reference to new profiling category.
static void kanzi::ProfilingCategory::setFilter ( string_view  filterConfiguration)
static

Sets the category filter.

Do not call this function directly.

Parameters
filterConfigurationFilter configuration string.
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
Thename of the profiling category to lookup.
Returns
Pointer to the profiling category object, 0 if category was not found.
void kanzi::ProfilingCategory::setEnabled ( bool  enabled)
inline

Enables or disables the profiling category.

Parameters
enabledWhether to enable or disable the category.
void kanzi::ProfilingCategory::setShownInHUD ( bool  shownInHUD)
inline

Shows or hides the profiling category in the HUD.

Parameters
shownInHUDWhether to show or hide the category in the HUD.
static void kanzi::ProfilingCategory::setAllEnabled ( bool  enabled)
static

Enables or disables all profiling categories.

Parameters
enabledWhether to enable or disable all categories.
static void kanzi::ProfilingCategory::setAllShownInHUD ( bool  shownInHUD)
static

Shows or hides all profiling categories in the HUD.

Parameters
shownInHUDWhether to show or hide all categories in the HUD.
FixedString kanzi::ProfilingCategory::getName ( ) const
inline

Gets the name of a profiling category.

Returns
Category name.
bool kanzi::ProfilingCategory::isEnabled ( ) const
inline

Checks whether a profiling category is enabled.

Returns
True if the category is enabled, otherwise false.
bool kanzi::ProfilingCategory::isShownInHUD ( ) const
inline

To check if the category is shown in the HUD, use isShownInHUD().

Returns
True if the category is shown in the HUD, otherwise false.

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