8#ifndef PXR_BASE_TRACE_EVENT_LIST_H
9#define PXR_BASE_TRACE_EVENT_LIST_H
13#include "pxr/base/trace/dataBuffer.h"
14#include "pxr/base/trace/dynamicKey.h"
15#include "pxr/base/trace/event.h"
16#include "pxr/base/trace/eventContainer.h"
19#include <unordered_set>
21PXR_NAMESPACE_OPEN_SCOPE
48 const_iterator end()
const {
return _events.end();}
50 using const_reverse_iterator = TraceEventContainer::const_reverse_iterator;
51 const_reverse_iterator rbegin()
const {
return _events.rbegin();}
52 const_reverse_iterator rend()
const {
return _events.rend();}
56 bool IsEmpty()
const {
return _events.empty();}
60 template <
class... Args>
62 return _events.emplace_back(std::forward<Args>(args)...);
70 KeyCache::const_iterator it = _caches.front().insert(key).first;
80 template <
typename T>
81 decltype(std::declval<TraceDataBuffer>().StoreData(std::declval<T>()))
96 std::unordered_set<TraceDynamicKey, TraceDynamicKey::HashFunctor>;
97 std::list<KeyCache> _caches;
102PXR_NAMESPACE_CLOSE_SCOPE
This class stores copies of data that are associated with TraceEvent instances.
const T * StoreData(const T &value)
Makes a copy of value and returns a pointer to it.
This class stores data used to create dynamic keys which can be referenced in TraceEvent instances.
Bidirectional iterator of TraceEvents.
Holds TraceEvent instances.
This represents an event recorded by a TraceCollector.
This class represents an ordered collection of TraceEvents and the TraceDynamicKeys and data that the...
TraceKey CacheKey(const TraceDynamicKey &key)
For speed the TraceEvent class holds a pointer to a TraceStaticKeyData.
const TraceEvent & EmplaceBack(Args &&... args)
Construct a TraceEvent at the end on the list.
TRACE_API TraceEventList()
Constructor.
bool IsEmpty() const
Returns whether there are any events in the list.
TraceEventList(TraceEventList &&)=default
Move Constructor.
TraceEventList & operator=(TraceEventList &&)=default
Move Assignment.
TRACE_API void Append(TraceEventList &&other)
Appends the given list to the end of this list.
decltype(std::declval< TraceDataBuffer >().StoreData(std::declval< T >())) StoreData(const T &value)
Copy data to the buffer and return a pointer to the cached data that is valid for the lifetime of the...
A wrapper around a TraceStaticKeyData pointer that is stored in TraceEvent instances.