qxLib
Public Member Functions | List of all members
qx::category Class Reference

A category is a class that identifies a particular piece of code. This code can be located in different files, but united by one functionality. Objects of this class can be used in logging, asserts and profiling. More...

#include <category.h>

Public Member Functions

constexpr category (string_view svName, const color &categoryColor=kDefaultColor) noexcept
 category object constructor More...
 
constexpr category set_verbosity (verbosity eVerbosity) const noexcept
 Create new category from this one with custom verbosity. More...
 
constexpr string_view get_name () const noexcept
 Get category name. More...
 
constexpr const colorget_color () const noexcept
 Get category color. More...
 
constexpr verbosity get_verbosity () const noexcept
 Get category verbosity. More...
 

Detailed Description

A category is a class that identifies a particular piece of code. This code can be located in different files, but united by one functionality. Objects of this class can be used in logging, asserts and profiling.

Author
Khrapov
Date
5.12.2022

Definition at line 55 of file category.h.

Constructor & Destructor Documentation

◆ category()

constexpr qx::category::category ( string_view  svName,
const color categoryColor = kDefaultColor 
)
explicitconstexprnoexcept

category object constructor

Parameters
svName- category name. For ex. CatRendering or CatWidgets
categoryColor- color to be used if supported

Definition at line 13 of file category.inl.

Member Function Documentation

◆ get_color()

constexpr const color & qx::category::get_color ( ) const
constexprnoexcept

Get category color.

Return values
-category color

Definition at line 31 of file category.inl.

◆ get_name()

constexpr string_view qx::category::get_name ( ) const
constexprnoexcept

Get category name.

Return values
-category name

Definition at line 26 of file category.inl.

◆ get_verbosity()

constexpr verbosity qx::category::get_verbosity ( ) const
constexprnoexcept

Get category verbosity.

Return values
-category verbosity User code will use this category with top priority and perform compile time checks if possible

Definition at line 36 of file category.inl.

◆ set_verbosity()

constexpr category qx::category::set_verbosity ( verbosity  eVerbosity) const
constexprnoexcept

Create new category from this one with custom verbosity.

Parameters
eVerbosity- category verbosity. User code will use this category with top priority and perform compile time checks if possible
Return values
-new category

Definition at line 19 of file category.inl.


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