#include "pxr/pxr.h"
#include "pxr/usd/sdf/schema.h"
#include "pxr/usd/sdf/spec.h"
#include "pxr/usd/sdf/types.h"
#include <type_traits>
Go to the source code of this file.
|
#define | _GET_KEY_(key_) key_ |
|
#define | SDF_NO_PREDICATE true |
|
#define | _GET_WITH_FALLBACK(key_, heldType_) |
|
#define | SDF_DEFINE_GET(name_, key_, heldType_) |
|
#define | SDF_DEFINE_IS(name_, key_) |
|
#define | SDF_DEFINE_SET(name_, key_, argType_) |
|
#define | SDF_DEFINE_HAS(name_, key_) |
|
#define | SDF_DEFINE_CLEAR(name_, key_) |
|
#define | SDF_DEFINE_GET_PRIVATE(name_, key_, heldType_) |
|
#define | SDF_DEFINE_DICTIONARY_GET(name_, key_) |
|
#define | SDF_DEFINE_DICTIONARY_SET(name_, key_) |
|
#define | SDF_DEFINE_TYPED_GET_SET(name_, key_, getType_, setType_) |
|
#define | SDF_DEFINE_TYPED_GET_SET_HAS_CLEAR(name_, key_, getType_, setType_) |
|
#define | SDF_DEFINE_GET_SET(name_, key_, type_) |
|
#define | SDF_DEFINE_GET_SET_HAS_CLEAR(name_, key_, type_) |
|
#define | SDF_DEFINE_IS_SET(name_, key_) |
|
#define | SDF_DEFINE_DICTIONARY_GET_SET(getName_, setName_, key_) |
|
|
template<typename T > |
using | Sdf_SetParameter = std::conditional< std::is_arithmetic< T >::value, std::add_const_t< T >, std::add_lvalue_reference_t< std::add_const_t< T >>> |
|
#define _GET_KEY_ |
( |
|
key_ | ) |
key_ |
#define _GET_WITH_FALLBACK |
( |
|
key_, |
|
|
|
heldType_ |
|
) |
| |
Value:{ \
if (value.IsEmpty() || !value.IsHolding<heldType_>()) { \
return schema.GetFallback(
_GET_KEY_(key_)).Get<heldType_>(); \
} \
else { \
return value.Get<heldType_>(); \
} \
}
Definition at line 60 of file accessorHelpers.h.
#define SDF_DEFINE_CLEAR |
( |
|
name_, |
|
|
|
key_ |
|
) |
| |
Value:void \
SDF_ACCESSOR_CLASS::Clear ## name_() \
{ \
_Helper::ClearField(
this,
_GET_KEY_(key_)); \
} \
}
Definition at line 117 of file accessorHelpers.h.
#define SDF_DEFINE_DICTIONARY_GET |
( |
|
name_, |
|
|
|
key_ |
|
) |
| |
Value:SdfDictionaryProxy \
SDF_ACCESSOR_CLASS::name_() const \
{ \
return SDF_ACCESSOR_READ_PREDICATE(
_GET_KEY_(key_)) ?
\
}
SdfMapEditProxy< VtDictionary > SdfDictionaryProxy
Definition at line 144 of file accessorHelpers.h.
#define SDF_DEFINE_DICTIONARY_GET_SET |
( |
|
getName_, |
|
|
|
setName_, |
|
|
|
key_ |
|
) |
| |
Value:
#define SDF_DEFINE_DICTIONARY_SET(name_, key_)
#define SDF_DEFINE_DICTIONARY_GET(name_, key_)
Definition at line 203 of file accessorHelpers.h.
#define SDF_DEFINE_DICTIONARY_SET |
( |
|
name_, |
|
|
|
key_ |
|
) |
| |
Value:void \
SDF_ACCESSOR_CLASS::name_( \
{ \
} \
else { \
} \
} \
}
GLsizei const GLchar *const * string
GLsizei const GLfloat * value
SdfMapEditProxy< VtDictionary > SdfDictionaryProxy
GLuint const GLchar * name
Definition at line 154 of file accessorHelpers.h.
#define SDF_DEFINE_GET |
( |
|
name_, |
|
|
|
key_, |
|
|
|
heldType_ |
|
) |
| |
Value:heldType_ \
SDF_ACCESSOR_CLASS::Get ## name_() const \
\
}
#define _GET_WITH_FALLBACK(key_, heldType_)
Definition at line 76 of file accessorHelpers.h.
#define SDF_DEFINE_GET_PRIVATE |
( |
|
name_, |
|
|
|
key_, |
|
|
|
heldType_ |
|
) |
| |
Value:heldType_ \
SDF_ACCESSOR_CLASS::_Get ## name_() const \
\
}
#define _GET_WITH_FALLBACK(key_, heldType_)
Definition at line 130 of file accessorHelpers.h.
#define SDF_DEFINE_GET_SET |
( |
|
name_, |
|
|
|
key_, |
|
|
|
type_ |
|
) |
| |
Value:
#define SDF_DEFINE_TYPED_GET_SET(name_, key_, getType_, setType_)
std::conditional< std::is_arithmetic< T >::value, std::add_const_t< T >, std::add_lvalue_reference_t< std::add_const_t< T >>> Sdf_SetParameter
Definition at line 191 of file accessorHelpers.h.
#define SDF_DEFINE_GET_SET_HAS_CLEAR |
( |
|
name_, |
|
|
|
key_, |
|
|
|
type_ |
|
) |
| |
Value:
#define SDF_DEFINE_TYPED_GET_SET_HAS_CLEAR(name_, key_, getType_, setType_)
std::conditional< std::is_arithmetic< T >::value, std::add_const_t< T >, std::add_lvalue_reference_t< std::add_const_t< T >>> Sdf_SetParameter
Definition at line 195 of file accessorHelpers.h.
#define SDF_DEFINE_HAS |
( |
|
name_, |
|
|
|
key_ |
|
) |
| |
Value:bool \
SDF_ACCESSOR_CLASS::Has ## name_() const \
{ \
return SDF_ACCESSOR_READ_PREDICATE(
_GET_KEY_(key_)) ? \
_Helper::HasField(
this,
_GET_KEY_(key_)) : false; \
}
Definition at line 108 of file accessorHelpers.h.
#define SDF_DEFINE_IS |
( |
|
name_, |
|
|
|
key_ |
|
) |
| |
Value:bool \
SDF_ACCESSOR_CLASS::Is ## name_() const \
return false; \
}
#define _GET_WITH_FALLBACK(key_, heldType_)
Definition at line 87 of file accessorHelpers.h.
#define SDF_DEFINE_IS_SET |
( |
|
name_, |
|
|
|
key_ |
|
) |
| |
Value:
#define SDF_DEFINE_SET(name_, key_, argType_)
#define SDF_DEFINE_IS(name_, key_)
Definition at line 199 of file accessorHelpers.h.
#define SDF_DEFINE_SET |
( |
|
name_, |
|
|
|
key_, |
|
|
|
argType_ |
|
) |
| |
#define SDF_DEFINE_TYPED_GET_SET |
( |
|
name_, |
|
|
|
key_, |
|
|
|
getType_, |
|
|
|
setType_ |
|
) |
| |
Value:
#define SDF_DEFINE_GET(name_, key_, heldType_)
#define SDF_DEFINE_SET(name_, key_, argType_)
Definition at line 182 of file accessorHelpers.h.
#define SDF_DEFINE_TYPED_GET_SET_HAS_CLEAR |
( |
|
name_, |
|
|
|
key_, |
|
|
|
getType_, |
|
|
|
setType_ |
|
) |
| |
Value:
#define SDF_DEFINE_CLEAR(name_, key_)
#define SDF_DEFINE_HAS(name_, key_)
#define SDF_DEFINE_TYPED_GET_SET(name_, key_, getType_, setType_)
Definition at line 186 of file accessorHelpers.h.
#define SDF_NO_PREDICATE true |
template<typename T >
using Sdf_SetParameter = std::conditional< std::is_arithmetic<T>::value, std::add_const_t<T>, std::add_lvalue_reference_t<std::add_const_t<T>>> |