8#ifndef PXR_BASE_TS_TYPE_HELPERS_H
9#define PXR_BASE_TS_TYPE_HELPERS_H
12#include "pxr/base/ts/api.h"
13#include "pxr/base/ts/types.h"
16#include "pxr/base/tf/type.h"
21PXR_NAMESPACE_OPEN_SCOPE
32struct Ts_IsSupportedValueType;
36struct Ts_IsSupportedValueType :
public std::false_type {};
39#define _MAKE_CLAUSE(unused, tuple) \
41 TS_API TfType Ts_GetType<TS_SPLINE_VALUE_CPP_TYPE(tuple)>(); \
43 struct Ts_IsSupportedValueType<TS_SPLINE_VALUE_CPP_TYPE(tuple)> : \
44 public std::true_type {};
45TF_PP_SEQ_FOR_EACH(_MAKE_CLAUSE, ~, TS_SPLINE_SUPPORTED_VALUE_TYPES)
54TfType Ts_GetTypeFromTypeName(
const std::string &typeName);
59std::string Ts_GetTypeNameFromType(
TfType valueType);
63 std::conditional_t<std::is_same_v<T, GfTimeCode>, double, T>;
69bool Ts_IsFinite(T value);
72TS_API
bool Ts_IsFinite(
const GfHalf value);
75TS_API
bool Ts_IsFinite(
const GfTimeCode value);
78bool Ts_IsFinite(
const T value)
80 return std::isfinite(value);
83PXR_NAMESPACE_CLOSE_SCOPE
Value type that represents a time code.
TfType represents a dynamic runtime type.
This header serves to simply bring in the half float datatype and provide a hash_value function.
pxr_half::half GfHalf
A 16-bit floating point data type.