This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TfWeakBase Class Reference

Enable a concrete base class for use with TfWeakPtr. More...

#include <weakBase.h>

+ Inheritance diagram for TfWeakBase:

Public Member Functions

 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Protected Member Functions

TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Enable a concrete base class for use with TfWeakPtr.

You should be familiar with the TfWeakPtr type before reading further.

A class is enabled for use with the TfWeakPtr type by publicly deriving from TfWeakBase. (Note that deriving from TfWeakBase adds data to a structure, so the result is no longer a "pure" interface class.)

For example,

class Simple : public TfWeakBase {
...
};
Enable a concrete base class for use with TfWeakPtr.
Definition: weakBase.h:124

Given the above inheritance, a Simple* can now be used to initialize an object of type TfWeakPtr<Simple>.

Definition at line 124 of file weakBase.h.

Constructor & Destructor Documentation

◆ TfWeakBase() [1/2]

TfWeakBase ( )
inline

Definition at line 126 of file weakBase.h.

◆ TfWeakBase() [2/2]

TfWeakBase ( const TfWeakBase )
inline

Definition at line 128 of file weakBase.h.

◆ ~TfWeakBase()

~TfWeakBase ( )
inlineprotected

Definition at line 157 of file weakBase.h.

Member Function Documentation

◆ __GetTfWeakBase__()

const TfWeakBase & __GetTfWeakBase__ ( ) const
inline

Definition at line 136 of file weakBase.h.

◆ _HasRemnant()

bool _HasRemnant ( ) const
inlineprotected

Definition at line 178 of file weakBase.h.

◆ _Register() [1/2]

TfRefPtr< Tf_Remnant > _Register ( ) const
inlineprotected

Definition at line 169 of file weakBase.h.

◆ _Register() [2/2]

TfRefPtr< Tf_Remnant > _Register ( T *  tempRmnt) const
inlineprotected

Definition at line 174 of file weakBase.h.

◆ operator=()

const TfWeakBase & operator= ( const TfWeakBase )
inline

Definition at line 140 of file weakBase.h.


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