Navigation
API > API/Plugins > API/Plugins/RigVM
The FRigVMMemoryContainer provides a heterogeneous memory container to store arbitrary data. Each element stored can be referred to using a FRigVMRegister. Elements can be accessed by index (index of the register), FRigVMOperand or by name. Name access is optional and is specified upon construction of the container. The memory container provides a series of templated functions to add and get data.
For example: int32 Index = Container.Add
This can also be done with arrays: TArray
Registers can store dynamically resizable memory as well by reyling on indirection.
Arrays with a single slice are going to be stored as a FRigVMByteArray, [unit8], so for example for a float array in C++ it would be (TArray
| Name | FRigVMMemoryContainer |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/RigVM/Source/RigVM/Public/RigVMCore/RigVMMemoryDeprecated.h |
| Include Path | #include "RigVMCore/RigVMMemoryDeprecated.h" |
Syntax
USTRUCT ()
struct FRigVMMemoryContainer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FRigVMMemoryContainer
(
const FRigVMMemoryContainer& Other |
RigVMCore/RigVMMemoryDeprecated.h | ||
FRigVMMemoryContainer
(
bool bInUseNames |
RigVMCore/RigVMMemoryDeprecated.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FRigVMMemoryContainer() |
RigVMCore/RigVMMemoryDeprecated.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEncounteredErrorDuringLoad | bool | RigVMCore/RigVMMemoryDeprecated.h |
|
|
| bUseNameMap | bool | RigVMCore/RigVMMemoryDeprecated.h | ||
| Data | TArray< uint8 > | RigVMCore/RigVMMemoryDeprecated.h |
|
|
| MemoryType | ERigVMMemoryType | RigVMCore/RigVMMemoryDeprecated.h | ||
| NameMap | TMap< FName, int32 > | RigVMCore/RigVMMemoryDeprecated.h |
|
|
| RegisterOffsets | TArray< FRigVMRegisterOffset > | RigVMCore/RigVMMemoryDeprecated.h | ||
| Registers | TArray< FRigVMRegister > | RigVMCore/RigVMMemoryDeprecated.h | ||
| ScriptStructs | TArray< TObjectPtr< UScriptStruct > > | RigVMCore/RigVMMemoryDeprecated.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Allocates a new named register. | RigVMCore/RigVMMemoryDeprecated.h | ||
int32 Allocate
(
int32 InElementSize, |
Allocates a new unnamed register. | RigVMCore/RigVMMemoryDeprecated.h | |
TArray< FRigVMRegister >::RangedForIteratorType begin () |
RigVMCore/RigVMMemoryDeprecated.h | ||
TArray< FRigVMRegister >::RangedForConstIteratorType begin () |
RigVMCore/RigVMMemoryDeprecated.h | ||
bool Construct
(
int32 InRegisterIndex, |
Performs optional construction of data within a struct register. | RigVMCore/RigVMMemoryDeprecated.h | |
bool CopyRegisters
(
const FRigVMMemoryContainer& InOther |
RigVMCore/RigVMMemoryDeprecated.h | ||
bool Destroy
(
int32 InRegisterIndex, |
Performs optional destruction of data within a struct register. | RigVMCore/RigVMMemoryDeprecated.h | |
void Empty() |
Resets the container and removes all storage. | RigVMCore/RigVMMemoryDeprecated.h | |
TArray< FRigVMRegister >::RangedForConstIteratorType end () |
RigVMCore/RigVMMemoryDeprecated.h | ||
TArray< FRigVMRegister >::RangedForIteratorType end () |
RigVMCore/RigVMMemoryDeprecated.h | ||
int32 FindOrAddScriptStruct
(
UScriptStruct* InScriptStruct |
Ensures to add a script struct to the internal map if needed. | RigVMCore/RigVMMemoryDeprecated.h | |
| Returns the index of a register based on the register name. | RigVMCore/RigVMMemoryDeprecated.h | ||
ERigVMMemoryType GetMemoryType() |
Returns the memory type of this container | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMOperand GetOperand
(
int32 InRegisterIndex, |
Returns an argument for a given register. | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMOperand GetOperand
(
int32 InRegisterIndex, |
Returns an argument for a given register. | RigVMCore/RigVMMemoryDeprecated.h | |
int32 GetOrAddRegisterOffset
(
int32 InRegisterIndex, |
Adds a register path and returns its index. | RigVMCore/RigVMMemoryDeprecated.h | |
int32 GetOrAddRegisterOffset
(
int32 InRegisterIndex, |
Adds a register path and returns its index. | RigVMCore/RigVMMemoryDeprecated.h | |
int32 GetOrAddRegisterOffset
(
int32 InRegisterIndex, |
Adds a register path and returns its index. | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMRegister & GetRegister
(
const FRigVMOperand& InArg |
Accessor for a register based on an argument | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMRegister & GetRegister
(
const FName& InName |
Accessor for a register based on a a name. note: only works if SupportsNames() == true | RigVMCore/RigVMMemoryDeprecated.h | |
const FRigVMRegister & GetRegister
(
int32 InIndex |
Const accessor for a register based on index | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMRegister & GetRegister
(
int32 InIndex |
Accessor for a register based on index | RigVMCore/RigVMMemoryDeprecated.h | |
const FRigVMRegister & GetRegister
(
const FRigVMOperand& InArg |
Const accessor for a register based on an argument | RigVMCore/RigVMMemoryDeprecated.h | |
const FRigVMRegister & GetRegister
(
const FName& InName |
Const accessor for a register based on a a name. note: only works if SupportsNames() == true | RigVMCore/RigVMMemoryDeprecated.h | |
UScriptStruct * GetScriptStruct
(
const FRigVMRegister& Register |
Returns the script struct used for a given register (can be nullptr for non-struct-registers). | RigVMCore/RigVMMemoryDeprecated.h | |
UScriptStruct * GetScriptStruct
(
int32 InRegisterIndex, |
Returns the script struct used for a given register index (can be nullptr for non-struct-registers). | RigVMCore/RigVMMemoryDeprecated.h | |
bool IsNameAvailable
(
const FName& InPotentialNewName |
Returns true if a given name is available for a new register. | RigVMCore/RigVMMemoryDeprecated.h | |
void Load
(
FArchive& Ar |
RigVMCore/RigVMMemoryDeprecated.h | ||
int32 Num() |
Returns the number of registers in this container | RigVMCore/RigVMMemoryDeprecated.h | |
void Reset() |
Resets the container but maintains storage. | RigVMCore/RigVMMemoryDeprecated.h | |
void Save
(
FArchive& Ar |
RigVMCore/RigVMMemoryDeprecated.h | ||
void Serialize
(
FArchive& Ar |
RigVMCore/RigVMMemoryDeprecated.h | ||
void SetMemoryType
(
ERigVMMemoryType InMemoryType |
Sets the memory type. should only be used when the container is empty | RigVMCore/RigVMMemoryDeprecated.h | |
bool SupportsNames() |
Returns true if this container supports name based lookup | RigVMCore/RigVMMemoryDeprecated.h | |
void UpdateRegisters() |
Updates internal data for topological changes. | RigVMCore/RigVMMemoryDeprecated.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FRigVMRegister & operator[]
(
int32 InIndex |
Const accessor for a register based on index | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMRegister & operator[]
(
int32 InIndex |
Accessor for a register based on index | RigVMCore/RigVMMemoryDeprecated.h | |
const FRigVMRegister & operator[]
(
const FRigVMOperand& InArg |
Const accessor for a register based on an argument | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMRegister & operator[]
(
const FRigVMOperand& InArg |
Accessor for a register based on an argument | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMRegister & operator[]
(
const FName& InName |
Accessor for a register based on a a name. note: only works if SupportsNames() == true | RigVMCore/RigVMMemoryDeprecated.h | |
const FRigVMRegister & operator[]
(
const FName& InName |
Const accessor for a register based on a a name. note: only works if SupportsNames() == true | RigVMCore/RigVMMemoryDeprecated.h | |
FRigVMMemoryContainer & operator=
(
const FRigVMMemoryContainer& InOther |
RigVMCore/RigVMMemoryDeprecated.h |