All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TraceCategory Class Reference

#include <category.h>

Public Types

enum  : TraceCategoryId { Default = 0 }

Public Member Functions

TRACE_API void RegisterCategory (TraceCategoryId id, const std::string &name)
TRACE_API std::vector
< std::string
GetCategories (TraceCategoryId id) const
 Returns all names associated with the id. More...

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. More...
static TRACE_API TraceCategoryGetInstance ()
 Singleton accessor. More...


class TfSingleton< TraceCategory >

Detailed Description

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.

Member Enumeration Documentation

anonymous enum : TraceCategoryId

Default category if none are explicitly specified when creating a TraceEvent.


Definition at line 65 of file category.h.

Member Function Documentation

template<int N>
static constexpr TraceCategoryId TraceCategory::CreateTraceCategoryId ( const char(&)  str[N])

Computes an id for the given a string literal str.

Definition at line 58 of file category.h.

TRACE_API std::vector<std::string> TraceCategory::GetCategories ( TraceCategoryId  id) const

Returns all names associated with the id.

static TRACE_API TraceCategory& TraceCategory::GetInstance ( )

Singleton accessor.

TRACE_API void TraceCategory::RegisterCategory ( TraceCategoryId  id,
const std::string name 

Associates the id with name. These associates are not necessarily unique.

Friends And Related Function Documentation

friend class TfSingleton< TraceCategory >

Definition at line 78 of file category.h.

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