HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
collectionNotice.h
Go to the documentation of this file.
1 //
2 // Copyright 2018 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 
8 #ifndef PXR_BASE_TRACE_COLLECTION_NOTICE_H
9 #define PXR_BASE_TRACE_COLLECTION_NOTICE_H
10 
11 #include "pxr/pxr.h"
12 
13 #include "pxr/base/trace/api.h"
14 #include "pxr/base/tf/notice.h"
16 
18 
19 ///////////////////////////////////////////////////////////////////////////////
20 /// \class TraceCollectionAvailable
21 ///
22 /// A TfNotice that is sent when the TraceCollector creates a TraceCollection.
23 /// This can potentially be sent from multiple threads. Listeners must be
24 /// thread safe.
26 {
27 public:
28  /// Constructor.
29  TraceCollectionAvailable(const std::shared_ptr<TraceCollection>& collection)
30  : _collection(collection)
31  {}
32 
33  /// Destructor.
35 
36  /// Returns the TraceCollection which was produced.
37  const std::shared_ptr<TraceCollection>& GetCollection() const {
38  return _collection;
39  }
40 
41 private:
42  std::shared_ptr<TraceCollection> _collection;
43 };
44 
46 
47 #endif // PXR_BASE_TRACE_COLLECTION_NOTICE_H
const std::shared_ptr< TraceCollection > & GetCollection() const
Returns the TraceCollection which was produced.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
TraceCollectionAvailable(const std::shared_ptr< TraceCollection > &collection)
Constructor.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
virtual TRACE_API ~TraceCollectionAvailable()
Destructor.
#define TRACE_API
Definition: api.h:23