8 #ifndef PXR_BASE_TRACE_EVENT_NODE_H
9 #define PXR_BASE_TRACE_EVENT_NODE_H
54 const bool separateEvents) {
57 key, category, beginTime, endTime, separateEvents)
65 void Append(
const TraceEventNodeRefPtr &node) {
66 Append(TraceEventNodeRefPtr { node });
113 return _attributesAndSeparateEvents.
BitsAs<
bool>();
121 void _SetIsSeparateEvents(
bool isSeparate) {
122 _attributesAndSeparateEvents.
SetBits(isSeparate);
130 : _category(category)
132 , _beginTime(beginTime)
134 , _attributesAndSeparateEvents(nullptr, separateEvents)
150 #endif // PXR_BASE_TRACE_EVENT_NODE_H
TfRefPtr< T > TfCreateRefPtr(T *ptr)
TRACE_API const AttributeMap & GetAttributes() const
Return the data associated with this node.
TimeStamp GetTimeDuration() const
Returns the time duration of this scope as GetEndTime() - GetBeginTime()
#define PXR_NAMESPACE_OPEN_SCOPE
void SetBits(Integral val) noexcept
Set the stored bits. No static range checking is performed.
static TraceEventNodeRefPtr New(const TfToken &key, const TraceCategoryId category, const TimeStamp beginTime, const TimeStamp endTime, const bool separateEvents)
bool IsFromSeparateEvents() const
TRACE_API void Append(TraceEventNodeRefPtr &&node)
Appends node as a child node.
void Append(const TraceEventNodeRefPtr &node)
Appends node as a child node.
TraceCategoryId GetCategory() const
Returns the category of this node.
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(TraceEventNode)
TfSpan< const TraceEventNodeRefPtr > GetChildrenRef() const
Returns a TfSpan of references to the children of this node.
constexpr Integral BitsAs() const noexcept
Retrieve the stored bits as the integral type Integral.
TraceEvent::TimeStamp TimeStamp
friend class Trace_EventTreeBuilder
TRACE_API void AddAttribute(const TfToken &key, AttributeData &&attr)
TRACE_API void SetBeginAndEndTimesFromChildren()
TimeStamp GetEndTime() const
Returns the time that this scope ended.
~TraceEventNode() override
#define PXR_NAMESPACE_CLOSE_SCOPE
uint64_t TimeStamp
Time in "ticks".
std::multimap< TfToken, AttributeData > AttributeMap
const TfToken & GetKey() const
Returns the name of this node.
TraceEventData AttributeData
static TRACE_API TraceEventNodeRefPtr New()
uint32_t TraceCategoryId
Categories that a TraceReporter can use to filter events.
TimeStamp GetBeginTime() const
Returns the time that this scope started.