8#ifndef PXR_BASE_VT_VALUE_COMPOSE_OVER_H
9#define PXR_BASE_VT_VALUE_COMPOSE_OVER_H
13#include "pxr/base/vt/api.h"
16#include "pxr/base/vt/value.h"
17#include "pxr/base/vt/valueRef.h"
21PXR_NAMESPACE_OPEN_SCOPE
35VtValueTypeCanComposeOver(std::type_info
const &strongType);
48VT_API std::optional<VtValue>
76Vt_RegisterComposeOver(std::type_info
const &strongType,
77 std::type_info
const &weakType,
84template <
class Ret,
class Strong,
class Weak>
86VtRegisterComposeOver(Ret (*fn)(Strong
const &, Weak
const &))
89 "Unexpected compose-over registration for one of the "
93 "Use VT_VALUE_TYPE_CAN_COMPOSE or specialize "
94 "VtValueTypeCanCompose<> before registering compose-over "
97 using TypedFn = Ret (*)(Strong
const &, Weak
const &);
98 using VoidFn = void (*)();
100 VoidFn voidFn =
reinterpret_cast<VoidFn
>(fn);
101 Vt_RegisterComposeOver(
102 typeid(Strong),
typeid(Weak), voidFn,
104 TypedFn tFn =
reinterpret_cast<TypedFn
>(vFn);
113PXR_NAMESPACE_CLOSE_SCOPE
Provides a container which may hold any type, and provides introspection and iteration over array typ...
A non-owning type-erased view of a value, interoperating with VtValue.
bool CanComposeOver() const
Return true if this value holds a type that has been declared at compile time to support composing ov...
_TypeInfoFor< T >::GetObjResultType UncheckedGet() const
Return a const reference to the viewed object if the viewed object is of type T.
bool IsHolding() const
Return true if this value is viewing an object of type T, false otherwise.
#define TF_DEV_AXIOM(cond)
The same as TF_AXIOM, but compiled only in dev builds.
Defines all the types "TYPED" for which Vt creates a VtTYPEDArray typedef.
A special sentinel type and singular value that can be used to "finalize" a composing type.
A trait to detect instantiations of VtArrayEdit, specialized in arrayEdit.h.
A trait indicating whether VtValue compose-over functionality can be registered for a type.