7#ifndef PXR_BASE_TF_TYPE_FUNCTIONS_H
8#define PXR_BASE_TF_TYPE_FUNCTIONS_H
17PXR_NAMESPACE_OPEN_SCOPE
36template <
class T,
class ENABLE =
void>
39 static T* GetRawPtr(T& t) {
44 static const T* GetRawPtr(
const T& t) {
48 static T& ConstructFromRawPtr(T* ptr) {
return *ptr; }
50 static bool IsNull(
const T&) {
54 static void Class_Object_MUST_Not_Be_Const() { }
55 static void Object_CANNOT_Be_a_Pointer() { }
60 static T* GetRawPtr(T* t) {
64 static T* ConstructFromRawPtr(T* ptr) {
return ptr; }
66 static bool IsNull(T* ptr) {
70 static void Class_Object_MUST_Be_Passed_By_Address() { }
71 static void Class_Object_MUST_Not_Be_Const() { }
76 static const T* GetRawPtr(
const T* t) {
80 static bool IsNull(
const T* ptr) {
84 static const T* ConstructFromRawPtr(T* ptr) {
return ptr; }
85 static void Class_Object_MUST_Be_Passed_By_Address() { }
88PXR_NAMESPACE_CLOSE_SCOPE
Implements assorted functions based on compile-time type information.