HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TfTypeFunctions< T, ENABLE > Class Template Reference

#include <typeFunctions.h>

Static Public Member Functions

static const TGetRawPtr (const T &t)
 
static TConstructFromRawPtr (T *ptr)
 
static bool IsNull (const T &)
 
static void Class_Object_MUST_Not_Be_Const ()
 
static void Object_CANNOT_Be_a_Pointer ()
 

Detailed Description

template<class T, class ENABLE = void>
class TfTypeFunctions< T, ENABLE >

Implements assorted functions based on compile-time type information.

TfTypeFunctions<T>::GetRawPtr(T* tPtr) returns tPtr. A smart-pointer class, such as TfRefPtr, may specialize this function to have different behavior. Note that for a non-pointer type, this returns the address of the object, which allows one to uniformly apply the -> operator for member function calls.

TfTypeFunctions<T>::ConstructFromRawPtr(T* tPtr) returns tPtr. Pointer-like objects should specialize this function so that given a raw pointer of type T*, they return a smart pointer pointing to that object (see refPtr.h for an example). Essentially, this is the inverse of TfTypeFunctions<T>::GetRawPtr.

Definition at line 54 of file typeFunctions.h.

Member Function Documentation

template<class T , class ENABLE = void>
static void TfTypeFunctions< T, ENABLE >::Class_Object_MUST_Not_Be_Const ( )
inlinestatic

Definition at line 71 of file typeFunctions.h.

template<class T , class ENABLE = void>
static T& TfTypeFunctions< T, ENABLE >::ConstructFromRawPtr ( T ptr)
inlinestatic

Definition at line 65 of file typeFunctions.h.

template<class T , class ENABLE = void>
static const T* TfTypeFunctions< T, ENABLE >::GetRawPtr ( const T t)
inlinestatic

Definition at line 61 of file typeFunctions.h.

template<class T , class ENABLE = void>
static bool TfTypeFunctions< T, ENABLE >::IsNull ( const T )
inlinestatic

Definition at line 67 of file typeFunctions.h.

template<class T , class ENABLE = void>
static void TfTypeFunctions< T, ENABLE >::Object_CANNOT_Be_a_Pointer ( )
inlinestatic

Definition at line 72 of file typeFunctions.h.


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