vt::trace::TraceRegistry struct

Public static functions

static auto registerEventHashed(std::string const& event_type_name, std::string const& event_name) -> TraceEntryIDType
static void setTraceName(TraceEntryIDType id, std::string const& name, std::string const& type_name)
static auto getEvent(TraceEntryIDType id) -> EventClassType const &

Function documentation

static TraceEntryIDType vt::trace::TraceRegistry::registerEventHashed(std::string const& event_type_name, std::string const& event_name)

Registers an event, if it does not already exist. Creates the event type (aka parent) as needed. Returns a non-0 value.

static void vt::trace::TraceRegistry::setTraceName(TraceEntryIDType id, std::string const& name, std::string const& type_name)

Changes the name of an event and/or event type name. Empty string values are ignored, which can be used for partial updates. Changing the type name will affect ALL events that share the type. Event trace IDs are not affected.

static EventClassType const & vt::trace::TraceRegistry::getEvent(TraceEntryIDType id)

Returns the event that corresponds with the ID. If not found the returned event has no_trace_entry_id for an ID. The resulting object is invalidated if new event types are added.