Loading...
Searching...
No Matches
TraceCollection Class Reference

This class owns lists of TraceEvent instances per thread, and allows read access to them. More...

#include <collection.h>

Classes

class  Visitor
 This interface provides a way to access data a TraceCollection. More...
 

Public Types

using This = TraceCollection
 
using EventList = TraceEventList
 
using EventListPtr = std::unique_ptr< EventList >
 

Public Member Functions

 TF_MALLOC_TAG_NEW ("Trace", "TraceCollection")
 
 TraceCollection ()=default
 Constructor.
 
 TraceCollection (TraceCollection &&)=default
 Move constructor.
 
TraceCollectionoperator= (TraceCollection &&)=default
 Move assignment operator.
 
 TraceCollection (const TraceCollection &)=delete
 
TraceCollectionoperator= (const TraceCollection &)=delete
 
TRACE_API void AddToCollection (const TraceThreadId &id, EventListPtr &&events)
 Appends events to the collection.
 
TRACE_API void Iterate (Visitor &visitor) const
 Forward iterates over the events of the collection and calls the visitor callbacks.
 
TRACE_API void ReverseIterate (Visitor &visitor) const
 Reverse iterates over the events of the collection and calls the visitor callbacks.
 

Detailed Description

This class owns lists of TraceEvent instances per thread, and allows read access to them.

Definition at line 49 of file collection.h.

Member Typedef Documentation

◆ EventList

Definition at line 55 of file collection.h.

◆ EventListPtr

using EventListPtr = std::unique_ptr<EventList>

Definition at line 56 of file collection.h.

◆ This

Definition at line 53 of file collection.h.

Constructor & Destructor Documentation

◆ TraceCollection() [1/2]

TraceCollection ( )
default

Constructor.

◆ TraceCollection() [2/2]

TraceCollection ( TraceCollection &&  )
default

Move constructor.

Member Function Documentation

◆ AddToCollection()

TRACE_API void AddToCollection ( const TraceThreadId id,
EventListPtr &&  events 
)

Appends events to the collection.

The collection will take ownership of the data.

◆ Iterate()

TRACE_API void Iterate ( Visitor visitor) const

Forward iterates over the events of the collection and calls the visitor callbacks.

◆ operator=()

TraceCollection & operator= ( TraceCollection &&  )
default

Move assignment operator.

◆ ReverseIterate()

TRACE_API void ReverseIterate ( Visitor visitor) const

Reverse iterates over the events of the collection and calls the visitor callbacks.


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