Loading...
Searching...
No Matches
SdfHandle< T > Class Template Reference

SdfHandle is a smart ptr that calls IsDormant() on the pointed-to object as an extra expiration check so that dormant objects appear to be expired. More...

#include <declareHandles.h>

Public Types

typedef SdfHandle< T > This
 
typedef T SpecType
 
typedef std::remove_const< SpecType >::type NonConstSpecType
 
typedef SdfHandle< NonConstSpecType > NonConstThis
 

Public Member Functions

 SdfHandle (TfNullPtrType)
 
 SdfHandle (const Sdf_IdentityRefPtr &id)
 
 SdfHandle (const SpecType &spec)
 
template<class U >
 SdfHandle (const SdfHandle< U > &x)
 
Thisoperator= (const This &x)
 
template<class U >
Thisoperator= (const SdfHandle< U > &x)
 
SpecType * operator-> () const
 Dereference.
 
const SpecType & GetSpec () const
 
void Reset ()
 
 operator UnspecifiedBoolType () const
 Returns true in a boolean context if the object is valid, false otherwise.
 
bool operator! () const
 Returns false in a boolean context if the object is valid, true otherwise.
 
template<class U >
bool operator== (const SdfHandle< U > &other) const
 Compares handles for equality.
 
template<class U >
bool operator< (const SdfHandle< U > &other) const
 Arranges handles in an arbitrary strict weak ordering.
 

Friends

bool operator!= (const SdfHandle &lhs, const SdfHandle &rhs)
 
bool operator> (const SdfHandle &lhs, const SdfHandle &rhs)
 
bool operator<= (const SdfHandle &lhs, const SdfHandle &rhs)
 
bool operator>= (const SdfHandle &lhs, const SdfHandle &rhs)
 
size_t hash_value (const This &x)
 Hash.
 
SpecType * get_pointer (const SdfHandle &x)
 

Detailed Description

template<class T>
class SdfHandle< T >

SdfHandle is a smart ptr that calls IsDormant() on the pointed-to object as an extra expiration check so that dormant objects appear to be expired.

Definition at line 45 of file declareHandles.h.

Member Typedef Documentation

◆ NonConstSpecType

template<class T >
std::remove_const<SpecType>::type NonConstSpecType

Definition at line 50 of file declareHandles.h.

◆ NonConstThis

template<class T >
SdfHandle<NonConstSpecType> NonConstThis

Definition at line 51 of file declareHandles.h.

◆ SpecType

template<class T >
T SpecType

Definition at line 48 of file declareHandles.h.

◆ This

template<class T >
SdfHandle<T> This

Definition at line 47 of file declareHandles.h.

Constructor & Destructor Documentation

◆ SdfHandle() [1/5]

template<class T >
SdfHandle ( )
inline

Definition at line 53 of file declareHandles.h.

◆ SdfHandle() [2/5]

template<class T >
SdfHandle ( TfNullPtrType )
inline

Definition at line 54 of file declareHandles.h.

◆ SdfHandle() [3/5]

template<class T >
SdfHandle ( const Sdf_IdentityRefPtr & id)
inlineexplicit

Definition at line 55 of file declareHandles.h.

◆ SdfHandle() [4/5]

template<class T >
SdfHandle ( const SpecType & spec)
inline

Definition at line 56 of file declareHandles.h.

◆ SdfHandle() [5/5]

template<class T >
template<class U >
SdfHandle ( const SdfHandle< U > & x)
inline

Definition at line 59 of file declareHandles.h.

Member Function Documentation

◆ GetSpec()

template<class T >
const SpecType & GetSpec ( ) const
inline

Definition at line 86 of file declareHandles.h.

◆ operator UnspecifiedBoolType()

template<class T >
operator UnspecifiedBoolType ( ) const
inline

Returns true in a boolean context if the object is valid, false otherwise.

Definition at line 102 of file declareHandles.h.

◆ operator!()

template<class T >
bool operator! ( ) const
inline

Returns false in a boolean context if the object is valid, true otherwise.

Definition at line 108 of file declareHandles.h.

◆ operator->()

template<class T >
SpecType * operator-> ( ) const
inline

Dereference.

Raises a fatal error if the object is invalid or dormant.

Definition at line 76 of file declareHandles.h.

◆ operator<()

template<class T >
template<class U >
bool operator< ( const SdfHandle< U > & other) const
inline

Arranges handles in an arbitrary strict weak ordering.

Note that this ordering is stable across path changes.

Definition at line 129 of file declareHandles.h.

◆ operator=() [1/2]

template<class T >
template<class U >
This & operator= ( const SdfHandle< U > & x)
inline

Definition at line 68 of file declareHandles.h.

◆ operator=() [2/2]

template<class T >
This & operator= ( const This & x)
inline

Definition at line 61 of file declareHandles.h.

◆ operator==()

template<class T >
template<class U >
bool operator== ( const SdfHandle< U > & other) const
inline

Compares handles for equality.

Definition at line 115 of file declareHandles.h.

◆ Reset()

template<class T >
void Reset ( )
inline

Definition at line 91 of file declareHandles.h.

Friends And Related Symbol Documentation

◆ get_pointer

template<class T >
SpecType * get_pointer ( const SdfHandle< T > & x)
friend

Definition at line 159 of file declareHandles.h.

◆ hash_value

template<class T >
size_t hash_value ( const This & x)
friend

Hash.

Definition at line 153 of file declareHandles.h.

◆ operator!=

template<class T >
bool operator!= ( const SdfHandle< T > & lhs,
const SdfHandle< T > & rhs )
friend
See also
SdfHandle::operator==

Definition at line 121 of file declareHandles.h.

◆ operator<=

template<class T >
bool operator<= ( const SdfHandle< T > & lhs,
const SdfHandle< T > & rhs )
friend
See also
SdfHandle::operator<

Definition at line 141 of file declareHandles.h.

◆ operator>

template<class T >
bool operator> ( const SdfHandle< T > & lhs,
const SdfHandle< T > & rhs )
friend
See also
SdfHandle::operator<

Definition at line 135 of file declareHandles.h.

◆ operator>=

template<class T >
bool operator>= ( const SdfHandle< T > & lhs,
const SdfHandle< T > & rhs )
friend
See also
SdfHandle::operator<

Definition at line 147 of file declareHandles.h.

◆ SdfHandle

template<class T >
template<class U >
friend class SdfHandle
friend

Definition at line 166 of file declareHandles.h.


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