21 #define QX_DEFINE_CATEGORY(name, ...) constexpr qx::category name(QXT(#name), ##__VA_ARGS__)
29 #define QX_SET_FILE_CATEGORY(_category) \
31 struct qx::details::file_category<qx::djb2a_hash(QX_SHORT_FILE, 0)> \
33 static constexpr const qx::category& get() noexcept \
43 #define QX_GET_FILE_CATEGORY() qx::details::file_category<qx::djb2a_hash(QX_SHORT_FILE)>::get()
60 static constexpr
auto kDefaultColor = color::white();
69 constexpr
bool operator==(
const category&)
const =
default;
76 constexpr
explicit category(string_view svName,
const color& categoryColor = kDefaultColor) noexcept;
90 constexpr string_view
get_name()
const noexcept;
106 color m_Color = kDefaultColor;
107 string_view m_svName;
108 verbosity m_Verbosity = QX_CONF_COMPILE_TIME_VERBOSITY;
117 namespace qx::details
120 template<
size_t nHash>
#define QX_DEFINE_CATEGORY(name,...)
Define a category.
A category is a class that identifies a particular piece of code. This code can be located in differe...
constexpr string_view get_name() const noexcept
Get category name.
constexpr category set_verbosity(verbosity eVerbosity) const noexcept
Create new category from this one with custom verbosity.
constexpr const color & get_color() const noexcept
Get category color.
constexpr verbosity get_verbosity() const noexcept
Get category verbosity.