Navigation
API > API/Plugins > API/Plugins/RigVMDeveloper
A cached value which relies on a version providing object. The versioned object needs to provide uint32 GetCachedValueVersion() Values within the cache are considered valid if they are a) set and b) the version of the cache matches the version of the versioned object.
| Name | TRigVMModelCachedValue |
| Type | class |
| Header File | /Engine/Plugins/Runtime/RigVM/Source/RigVMDeveloper/Public/RigVMModel/RigVMModelCachedValue.h |
| Include Path | #include "RigVMModel/RigVMModelCachedValue.h" |
Syntax
template<typename VersionObjectType, typename ValueType>
class TRigVMModelCachedValue
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Default empty constructor | RigVMModel/RigVMModelCachedValue.h | ||
TRigVMModelCachedValue
(
const VersionObjectType* InObject |
Constructor for an empty cache bound to a versioned object | RigVMModel/RigVMModelCachedValue.h | |
TRigVMModelCachedValue
(
VersionObjectType* InObject, |
Constructor for a valid cache bound to a versioned object | RigVMModel/RigVMModelCachedValue.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LastObjectVersion | uint32 | RigVMModel/RigVMModelCachedValue.h | ||
| Value | TOptional< ValueType > | RigVMModel/RigVMModelCachedValue.h | ||
| VersionedObjectWeakPtr | TWeakObjectPtr< const VersionObjectType > | RigVMModel/RigVMModelCachedValue.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Bind
(
const VersionObjectType* InVersionedObject |
Binds the cache to a new versioned object | RigVMModel/RigVMModelCachedValue.h | |
const ValueType & Get
(
const ValueType& InDefault |
Returns the cached value if it is valid - or otherwise returns the default | RigVMModel/RigVMModelCachedValue.h | |
const ValueType & GetValue() |
Returns the cached value | RigVMModel/RigVMModelCachedValue.h | |
bool IsBound() |
Returns true if the cache is bound to a versioned object | RigVMModel/RigVMModelCachedValue.h | |
bool IsValid() |
Returns true if the cache is bound, the value has been set and the version is current | RigVMModel/RigVMModelCachedValue.h | |
void ResetCachedValue() |
Resets the cached value | RigVMModel/RigVMModelCachedValue.h | |
void Set
(
const ValueType& InValue |
Sets the cached value and updates the last version given the bound object | RigVMModel/RigVMModelCachedValue.h | |
void Unbind() |
Unbinds the cache from a versioned object | RigVMModel/RigVMModelCachedValue.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const ValueType& InValueType |
Compares the cached value usinga comparison operator | RigVMModel/RigVMModelCachedValue.h | |
TRigVMModelCachedValue & operator=
(
const ValueType& InValueType |
Sets the value using an assignment operator | RigVMModel/RigVMModelCachedValue.h | |
bool operator==
(
const ValueType& InValueType |
Compares the cached value using a comparison operator | RigVMModel/RigVMModelCachedValue.h |