![]() |
|
This singleton class provides a way to mark TraceEvent instances with category Ids which can be used to filter them. More...
#include <category.h>
Public Types | |
enum | : TraceCategoryId { Default = 0 } |
Default category if none are explicitly specified when creating a TraceEvent. More... | |
Public Member Functions | |
TRACE_API void | RegisterCategory (TraceCategoryId id, const std::string &name) |
Associates the id with name . | |
TRACE_API std::vector< std::string > | GetCategories (TraceCategoryId id) const |
Returns all names associated with the id . | |
Static Public Member Functions | |
template<int N> | |
static constexpr TraceCategoryId | CreateTraceCategoryId (const char(&str)[N]) |
Computes an id for the given a string literal str . | |
static TRACE_API TraceCategory & | GetInstance () |
Singleton accessor. | |
Friends | |
class | TfSingleton< TraceCategory > |
This singleton class provides a way to mark TraceEvent instances with category Ids which can be used to filter them.
This class also provides a way to associate TraceCategoryId values with human readable names.
Definition at line 54 of file category.h.
anonymous enum : TraceCategoryId |
Default category if none are explicitly specified when creating a TraceEvent.
Definition at line 65 of file category.h.
|
inlinestaticconstexpr |
Computes an id for the given a string literal str
.
Definition at line 58 of file category.h.
TRACE_API std::vector< std::string > GetCategories | ( | TraceCategoryId | id | ) | const |
Returns all names associated with the id
.
|
static |
Singleton accessor.
TRACE_API void RegisterCategory | ( | TraceCategoryId | id, |
const std::string & | name | ||
) |
Associates the id
with name
.
These associates are not necessarily unique.
|
friend |
Definition at line 75 of file category.h.