HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
types.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/vt/api.h"
#include "pxr/base/vt/traits.h"
#include "pxr/base/arch/inttypes.h"
#include "pxr/base/gf/declare.h"
#include "pxr/base/gf/half.h"
#include "pxr/base/tf/meta.h"
#include "pxr/base/tf/preprocessorUtilsLite.h"
#include "pxr/base/tf/token.h"
#include <cstddef>
#include <cstring>
#include <string>
+ Include dependency graph for types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  VtArray< T >
 
struct  VtIsKnownValueType_Workaround< T >
 
struct  Vt_ShapeData
 

Namespaces

 Vt_KnownValueTypeDetail
 

Macros

#define VT_FLOATING_POINT_BUILTIN_VALUE_TYPES
 
#define VT_INTEGRAL_BUILTIN_VALUE_TYPES
 
#define VT_VEC_INT_VALUE_TYPES
 
#define VT_VEC_HALF_VALUE_TYPES
 
#define VT_VEC_FLOAT_VALUE_TYPES
 
#define VT_VEC_DOUBLE_VALUE_TYPES
 
#define VT_VEC_VALUE_TYPES
 
#define VT_MATRIX_FLOAT_VALUE_TYPES
 
#define VT_MATRIX_DOUBLE_VALUE_TYPES
 
#define VT_MATRIX_VALUE_TYPES
 
#define VT_GFRANGE_VALUE_TYPES
 
#define VT_RANGE_VALUE_TYPES
 
#define VT_STRING_VALUE_TYPES
 
#define VT_QUATERNION_VALUE_TYPES
 
#define VT_DUALQUATERNION_VALUE_TYPES
 
#define VT_NONARRAY_VALUE_TYPES
 
#define VT_TYPE(elem)   TF_PP_TUPLE_ELEM(0, elem)
 
#define VT_TYPE_NAME(elem)   TF_PP_TUPLE_ELEM(1, elem)
 
#define VT_BUILTIN_NUMERIC_VALUE_TYPES   VT_INTEGRAL_BUILTIN_VALUE_TYPES VT_FLOATING_POINT_BUILTIN_VALUE_TYPES
 
#define VT_BUILTIN_VALUE_TYPES   VT_BUILTIN_NUMERIC_VALUE_TYPES VT_STRING_VALUE_TYPES
 
#define VT_SCALAR_CLASS_VALUE_TYPES
 
#define VT_SCALAR_VALUE_TYPES   VT_SCALAR_CLASS_VALUE_TYPES VT_BUILTIN_VALUE_TYPES
 
#define VT_ARRAY_TYPEDEF(unused, elem)
 
#define VT_ARRAY_TYPE_TUPLE(unused, elem)
 
#define VT_ARRAY_VALUE_TYPES   TF_PP_SEQ_FOR_EACH(VT_ARRAY_TYPE_TUPLE, ~, VT_SCALAR_VALUE_TYPES)
 
#define VT_CLASS_VALUE_TYPES   VT_ARRAY_VALUE_TYPES VT_SCALAR_CLASS_VALUE_TYPES VT_NONARRAY_VALUE_TYPES
 
#define VT_VALUE_TYPES   VT_BUILTIN_VALUE_TYPES VT_CLASS_VALUE_TYPES
 
#define _VT_MAP_TYPE_LIST(unused, elem)   , VT_TYPE(elem)
 
#define VT_SPECIALIZE_IS_VALUE_PROXY(unused, elem)
 

Typedefs

using Vt_ValueTypeList = TfMetaApply< TfMetaTail, TfMetaList< void TF_PP_SEQ_FOR_EACH(_VT_MAP_TYPE_LIST,~, VT_VALUE_TYPES)>>
 

Functions

PXR_NAMESPACE_OPEN_SCOPE VT_TYPE_IS_CHEAP_TO_COPY (TfToken)
 
template<typename T >
constexpr int Vt_KnownValueTypeDetail::GetIndexImpl (TfMetaList<>)
 
template<typename T , typename Typelist >
constexpr int Vt_KnownValueTypeDetail::GetIndexImpl (Typelist)
 
template<typename T >
constexpr int Vt_KnownValueTypeDetail::GetIndex ()
 
constexpr int VtGetNumKnownValueTypes ()
 
template<class T >
constexpr int VtGetKnownValueTypeIndex ()
 
template<class T >
constexpr bool VtIsKnownValueType ()
 Returns true if T is a type that appears in VT_VALUE_TYPES. More...
 
template<typename T >
VtZero ()
 

Detailed Description

Defines all the types "TYPED" for which Vt creates a VtTYPEDArray typedef.

Definition in file types.h.

Macro Definition Documentation

#define _VT_MAP_TYPE_LIST (   unused,
  elem 
)    , VT_TYPE(elem)

Definition at line 173 of file types.h.

#define VT_ARRAY_TYPE_TUPLE (   unused,
  elem 
)
Value:
Definition: ImfArray.h:45
#define TF_PP_CAT(x, y)
#define VT_TYPE_NAME(elem)
Definition: types.h:126

Definition at line 161 of file types.h.

#define VT_ARRAY_TYPEDEF (   unused,
  elem 
)
Value:
Definition: ImfArray.h:45
#define TF_PP_CAT(x, y)
Definition: types.h:153
#define VT_TYPE_NAME(elem)
Definition: types.h:126

Definition at line 154 of file types.h.

#define VT_ARRAY_VALUE_TYPES   TF_PP_SEQ_FOR_EACH(VT_ARRAY_TYPE_TUPLE, ~, VT_SCALAR_VALUE_TYPES)

Definition at line 164 of file types.h.

#define VT_BUILTIN_NUMERIC_VALUE_TYPES   VT_INTEGRAL_BUILTIN_VALUE_TYPES VT_FLOATING_POINT_BUILTIN_VALUE_TYPES

Definition at line 131 of file types.h.

#define VT_BUILTIN_VALUE_TYPES   VT_BUILTIN_NUMERIC_VALUE_TYPES VT_STRING_VALUE_TYPES

Definition at line 134 of file types.h.

Definition at line 167 of file types.h.

#define VT_DUALQUATERNION_VALUE_TYPES
Value:
(( GfDualQuath, DualQuath )) \
(( GfDualQuatf, DualQuatf )) \
(( GfDualQuatd, DualQuatd ))

Definition at line 114 of file types.h.

#define VT_FLOATING_POINT_BUILTIN_VALUE_TYPES
Value:
(( double, Double )) \
(( float, Float )) \
(( GfHalf, Half ))
double Float
Definition: APEX_Include.h:62
pxr_half::half GfHalf
A 16-bit floating point data type.
Definition: half.h:26
IMATH_NAMESPACE::V2f IMATH_NAMESPACE::Box2i std::string this attribute is obsolete as of OpenEXR v3 float
Definition: Types.h:101

Definition at line 35 of file types.h.

#define VT_GFRANGE_VALUE_TYPES
Value:
(( GfRange3f, Range3f )) \
(( GfRange3d, Range3d )) \
(( GfRange2f, Range2f )) \
(( GfRange2d, Range2d )) \
(( GfRange1f, Range1f )) \
(( GfRange1d, Range1d ))

Definition at line 91 of file types.h.

#define VT_INTEGRAL_BUILTIN_VALUE_TYPES
Value:
(( bool, Bool )) \
(( char, Char )) \
(( unsigned char, UChar )) \
(( short, Short )) \
(( unsigned short, UShort )) \
(( int, Int )) \
(( unsigned int, UInt )) \
(( int64_t, Int64 )) \
(( uint64_t, UInt64 ))
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
OutGridT const XformOp bool bool
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER typedef long long unsigned int Int64
Int64 - unsigned 64-bit integer.
Definition: ImathInt64.h:37
exint Int
Definition: APEX_Include.h:61
bool Bool
Definition: APEX_Include.h:60

Definition at line 40 of file types.h.

#define VT_MATRIX_DOUBLE_VALUE_TYPES
Value:
(( GfMatrix4d, Matrix4d )) \
(( GfMatrix3d, Matrix3d )) \
(( GfMatrix2d, Matrix2d ))

Definition at line 82 of file types.h.

#define VT_MATRIX_FLOAT_VALUE_TYPES
Value:
(( GfMatrix4f, Matrix4f )) \
(( GfMatrix3f, Matrix3f )) \
(( GfMatrix2f, Matrix2f )) \

Definition at line 77 of file types.h.

#define VT_MATRIX_VALUE_TYPES
Value:

Definition at line 87 of file types.h.

#define VT_NONARRAY_VALUE_TYPES
Value:

Definition at line 119 of file types.h.

#define VT_QUATERNION_VALUE_TYPES
Value:
(( GfQuath, Quath )) \
(( GfQuatf, Quatf )) \
(( GfQuatd, Quatd )) \
Definition: quath.h:43
Definition: quatf.h:42
Quat< double > Quatd
Quaternion of type double.
Definition: ImathQuat.h:265
Quat< float > Quatf
Quaternion of type float.
Definition: ImathQuat.h:262
UT_QuaternionT< Float > Quaternion
Definition: APEX_Include.h:107
Definition: quatd.h:42

Definition at line 108 of file types.h.

#define VT_RANGE_VALUE_TYPES
Value:
(( GfRect2i, Rect2i ))
#define VT_GFRANGE_VALUE_TYPES
Definition: types.h:91

Definition at line 99 of file types.h.

#define VT_SCALAR_CLASS_VALUE_TYPES
#define VT_SCALAR_VALUE_TYPES   VT_SCALAR_CLASS_VALUE_TYPES VT_BUILTIN_VALUE_TYPES

Definition at line 144 of file types.h.

#define VT_SPECIALIZE_IS_VALUE_PROXY (   unused,
  elem 
)
Value:
template <> struct \
VtIsValueProxy< VT_TYPE(elem) > : std::false_type {}; \
template <> struct \
VtIsTypedValueProxy< VT_TYPE(elem) > : std::false_type {}; \
template <> struct \
VtIsErasedValueProxy< VT_TYPE(elem) > : std::false_type {};

Definition at line 264 of file types.h.

#define VT_STRING_VALUE_TYPES
Value:
(( std::string, String )) \
(( TfToken, Token ))
Definition: token.h:70
UT_StringHolder String
Definition: APEX_Include.h:63

Definition at line 104 of file types.h.

#define VT_TYPE (   elem)    TF_PP_TUPLE_ELEM(0, elem)

Definition at line 124 of file types.h.

#define VT_TYPE_NAME (   elem)    TF_PP_TUPLE_ELEM(1, elem)

Definition at line 126 of file types.h.

#define VT_VALUE_TYPES   VT_BUILTIN_VALUE_TYPES VT_CLASS_VALUE_TYPES

Definition at line 170 of file types.h.

#define VT_VEC_DOUBLE_VALUE_TYPES
Value:
(( GfVec4d, Vec4d )) \
(( GfVec3d, Vec3d )) \
(( GfVec2d, Vec2d ))
Definition: vec4d.h:45
Vec4< double > Vec4d
Definition: NanoVDB.h:1832
Definition: vec2d.h:45
Vec3< double > Vec3d
Definition: NanoVDB.h:1685
Definition: vec3d.h:45

Definition at line 66 of file types.h.

#define VT_VEC_FLOAT_VALUE_TYPES
Value:
(( GfVec4f, Vec4f )) \
(( GfVec3f, Vec3f )) \
(( GfVec2f, Vec2f ))
Vec4< float > Vec4f
Definition: NanoVDB.h:1833
Vec3< float > Vec3f
Definition: NanoVDB.h:1686
Definition: vec3f.h:45
Definition: vec4f.h:45
Definition: vec2f.h:45
math::Vec2< float > Vec2f
Definition: Types.h:65

Definition at line 61 of file types.h.

#define VT_VEC_HALF_VALUE_TYPES
Value:
(( GfVec4h, Vec4h )) \
(( GfVec3h, Vec3h )) \
(( GfVec2h, Vec2h ))
Definition: vec4h.h:46
Definition: vec2h.h:46
Definition: vec3h.h:46

Definition at line 56 of file types.h.

#define VT_VEC_INT_VALUE_TYPES
Value:
(( GfVec4i, Vec4i )) \
(( GfVec3i, Vec3i )) \
(( GfVec2i, Vec2i ))
Definition: vec4i.h:43
Definition: vec2i.h:43
Definition: vec3i.h:43
Vec3< int32_t > Vec3i
Definition: NanoVDB.h:1687
Vec4< int > Vec4i
Definition: NanoVDB.h:1834

Definition at line 51 of file types.h.

#define VT_VEC_VALUE_TYPES

Typedef Documentation

Function Documentation

PXR_NAMESPACE_OPEN_SCOPE VT_TYPE_IS_CHEAP_TO_COPY ( TfToken  )
template<class T >
constexpr int VtGetKnownValueTypeIndex ( )

Provide compile-time value type indexes for types that are "known" to Vt – specifically, those types that appear in VT_VALUE_TYPES. Note that VtArray and VtValue can work with other types that are not these "known" types.

VtGetKnownValueTypeIndex can only be used with known types. Querying a type that is not known to Vt results in a compilation error. The set of known types and their indexes are not guaranteed to be stable across releases of the library.

Most clients should prefer VtVisitValue over direct use of the type index as VtVisitValue provides convenient and efficient access to the held value.

Definition at line 237 of file types.h.

constexpr int VtGetNumKnownValueTypes ( )

Definition at line 219 of file types.h.

template<class T >
constexpr bool VtIsKnownValueType ( )

Returns true if T is a type that appears in VT_VALUE_TYPES.

Definition at line 247 of file types.h.

template<typename T >
T VtZero ( )