25 #ifndef PXR_BASE_TRACE_REPORTER_BASE_H
26 #define PXR_BASE_TRACE_REPORTER_BASE_H
30 #include "pxr/base/trace/api.h"
31 #include "pxr/base/trace/collectionNotice.h"
32 #include "pxr/base/trace/collection.h"
33 #include "pxr/base/trace/reporterDataSourceBase.h"
37 #include <tbb/concurrent_vector.h>
41 PXR_NAMESPACE_OPEN_SCOPE
56 using ThisPtr = TraceReporterBasePtr;
57 using ThisRefPtr = TraceReporterBaseRefPtr;
58 using CollectionPtr = std::shared_ptr<TraceCollection>;
59 using DataSourcePtr = std::unique_ptr<TraceReporterDataSourceBase>;
81 DataSourcePtr _dataSource;
82 tbb::concurrent_vector<CollectionPtr> _processedCollections;
85 PXR_NAMESPACE_CLOSE_SCOPE
87 #endif // PXR_BASE_TRACE_REPORTER_BASE_H
Standard pointer typedefs.
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
This class is a base class for report implementations.
Enable a concrete base class for use with TfRefPtr.
virtual void _ProcessCollection(const CollectionPtr &)=0
Called once per collection from _Update()
TRACE_API TraceReporterBase(DataSourcePtr dataSource)
Constructor taking ownership of dataSource.
TRACE_API void _Update()
Gets the latest data from the TraceCollector singleton and processes all collections that have been r...
virtual TRACE_API ~TraceReporterBase()
Destructor.
TRACE_API bool SerializeProcessedCollections(std::ostream &ostr) const
Write all collections that were processed by this reporter to ostr.
TRACE_API void _Clear()
Removes all references to TraceCollections.
Enable a concrete base class for use with TfWeakPtr.