All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
refPtrTracker.h File Reference
+ Include dependency graph for refPtrTracker.h:

Go to the source code of this file.

Classes

class  TfRefPtrTracker
 Provides tracking of TfRefPtr objects to particular objects. More...
 
struct  TfRefPtrTracker::Trace
 A track trace. More...
 

Macros

#define TF_DECLARE_REFPTR_TRACK(T)
 
#define TF_DEFINE_REFPTR_TRACK(T, COND)
 

Functions

 TF_API_TEMPLATE_CLASS (TfSingleton< TfRefPtrTracker >)
 

Class Documentation

◆ TfRefPtrTracker::Trace

struct TfRefPtrTracker::Trace

A track trace.

Definition at line 99 of file refPtrTracker.h.

Class Members
const TfRefBase * obj The object being pointed to.
vector< uintptr_t > trace The stack trace when the TfRefPtr was created or assigned to.
TraceType type Whether the TfRefPtr was created or assigned to.

Macro Definition Documentation

◆ TF_DECLARE_REFPTR_TRACK

#define TF_DECLARE_REFPTR_TRACK (   T)
Value:
inline void \
Tf_RefPtrTracker_FirstRef(const void*, const TfRefBase *obj, T*); \
inline void \
Tf_RefPtrTracker_LastRef(const void*, const TfRefBase *obj, T*); \
inline void \
Tf_RefPtrTracker_New(const void* owner, const TfRefBase *obj, T*); \
inline void \
Tf_RefPtrTracker_Delete(const void* owner, const TfRefBase *obj, T*); \
inline void \
Tf_RefPtrTracker_Assign(const void* owner, \
const TfRefBase *obj, const TfRefBase *oldObj, T*);
Enable a concrete base class for use with TfRefPtr.
Definition: refBase.h:56

Definition at line 219 of file refPtrTracker.h.

◆ TF_DEFINE_REFPTR_TRACK

#define TF_DEFINE_REFPTR_TRACK (   T,
  COND 
)
Value:
inline void \
Tf_RefPtrTracker_FirstRef(const void*, const TfRefBase *obj, T*) { \
if (obj && COND(obj)) Tf_RefPtrTrackerUtil::Watch(obj); \
} \
inline void \
Tf_RefPtrTracker_LastRef(const void*, const TfRefBase *obj, T*) { \
Tf_RefPtrTrackerUtil::Unwatch(obj); \
} \
inline void \
Tf_RefPtrTracker_New(const void* owner, const TfRefBase *obj, T*) { \
Tf_RefPtrTrackerUtil::AddTrace(owner, obj); \
} \
inline void \
Tf_RefPtrTracker_Delete(const void* owner, const TfRefBase *obj, T*) { \
Tf_RefPtrTrackerUtil::RemoveTraces(owner); \
} \
inline void \
Tf_RefPtrTracker_Assign(const void* owner, const TfRefBase *obj, \
const TfRefBase *oldObj, T*) { \
if (oldObj != obj) { \
Tf_RefPtrTrackerUtil::AddTrace( \
owner, obj, TfRefPtrTracker::Assign); \
} \
}

Definition at line 232 of file refPtrTracker.h.