HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
valueComposeOver.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/vt/api.h"
#include "pxr/base/vt/traits.h"
#include "pxr/base/vt/types.h"
#include "pxr/base/vt/value.h"
#include "pxr/base/vt/valueRef.h"
#include <optional>
+ Include dependency graph for valueComposeOver.h:

Go to the source code of this file.

Classes

struct  VtBackgroundType
 

Functions

PXR_NAMESPACE_OPEN_SCOPE bool VtValueCanComposeOver (VtValueRef val)
 
VT_API bool VtValueTypeCanComposeOver (std::type_info const &strongType)
 
VT_API bool VtValueCanComposeOver (VtValueRef stronger, VtValueRef weaker)
 
VT_API std::optional< VtValueVtValueTryComposeOver (VtValueRef stronger, VtValueRef weaker)
 
VT_API VtValue VtValueComposeOver (VtValueRef stronger, VtValueRef weaker)
 
bool operator== (VtBackgroundType, VtBackgroundType)
 
VT_API void Vt_RegisterComposeOver (std::type_info const &strongType, std::type_info const &weakType, void(*voidFn)(), VtValue(*over)(VtValueRef, VtValueRef, void(*)()))
 
template<class Ret , class Strong , class Weak >
void VtRegisterComposeOver (Ret(*fn)(Strong const &, Weak const &))
 

Variables

constexpr VtBackgroundType VtBackground
 

Function Documentation

bool operator== ( VtBackgroundType  ,
VtBackgroundType   
)
inline

Definition at line 70 of file valueComposeOver.h.

VT_API void Vt_RegisterComposeOver ( std::type_info const &  strongType,
std::type_info const &  weakType,
void(*)()  voidFn,
VtValue(*)(VtValueRef, VtValueRef, void(*)())  over 
)
template<class Ret , class Strong , class Weak >
void VtRegisterComposeOver ( Ret(*)(Strong const &, Weak const &)  fn)

Register compose-over functionality for values of type Strong over Weak. It is essential that the function be associative. That is, ((A over B) over C) must yield the same result as (A over (B over C)).

Definition at line 86 of file valueComposeOver.h.

PXR_NAMESPACE_OPEN_SCOPE bool VtValueCanComposeOver ( VtValueRef  val)
inline

Return true if the result of VtValueCanComposeOver(val, x) could be true for some x, false otherwise. The empty value can always compose-over. This is a faster check than the two-argument form of VtValueCanComposeOver().

Definition at line 28 of file valueComposeOver.h.

VT_API bool VtValueCanComposeOver ( VtValueRef  stronger,
VtValueRef  weaker 
)

Return true if stronger composes non-trivially over weaker. Specifically, if stronger can never compose-over (see the single-argument form) or if no compose-over functionality has been defined for values of stronger's type over values of weaker's type, return false. Otherwise return true. In other words, if this function returns false, then VtValueComposeOver(stronger, weaker) always returns stronger.

VT_API VtValue VtValueComposeOver ( VtValueRef  stronger,
VtValueRef  weaker 
)

Return the result of composing stronger over weaker. If stronger never composes-over, or if no compose-over functionality has been defined for values of stronger's type over weaker's type, return stronger. Otherwise invoke the compose-over function and return the result. If stronger is empty, return weaker.

VT_API std::optional<VtValue> VtValueTryComposeOver ( VtValueRef  stronger,
VtValueRef  weaker 
)

If VtValueCanComposeOver(stronger, weaker), then return VtValueComposeOver(stronger, weaker). Otherwise return an empty optional.

VT_API bool VtValueTypeCanComposeOver ( std::type_info const &  strongType)

Return true if VtRegisterComposeOver() has been called with strongType as the stronger type.

Variable Documentation

constexpr VtBackgroundType VtBackground
inline

Definition at line 66 of file valueComposeOver.h.