Navigation
API > API/Plugins > API/Plugins/RigVM > API/Plugins/RigVM/RigVMCore
References
| Module | RigVM |
| Header | /Engine/Plugins/Runtime/RigVM/Source/RigVM/Public/RigVMCore/RigVMMemoryDeprecated.h |
| Include | #include "RigVMCore/RigVMMemoryDeprecated.h" |
Syntax
USTRUCT ()
struct FRigVMMemoryContainer
Remarks
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
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bEncounteredErrorDuringLoad | ||
| bool | bUseNameMap | ||
| TArray< uint8 > | Data | ||
| ERigVMMemoryType | MemoryType | ||
| TMap< FName, int32 > | NameMap | ||
| TArray< FRigVMRegisterOffset > | RegisterOffsets | ||
| TArray< FRigVMRegister > | Registers | ||
| TArray< TObjectPtr< UScriptStruct > > | ScriptStructs |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FRigVMMemoryContainer
(
bool bInUseNames |
|||
FRigVMMemoryContainer
(
const FRigVMMemoryContainer& Other |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | Allocates a new named register. | ||
| int32 | Allocates a new unnamed register. | ||
| TArray< FRigVMRegister >::RangedForConstIteratorType | begin () |
||
| TArray< FRigVMRegister >::RangedForIteratorType | begin () |
||
| bool | Performs optional construction of data within a struct register. | ||
| bool | CopyRegisters
(
const FRigVMMemoryContainer& InOther |
||
| bool | Performs optional destruction of data within a struct register. | ||
| void | Empty () |
Resets the container and removes all storage. | |
| TArray< FRigVMRegister >::RangedForConstIteratorType | end () |
||
| TArray< FRigVMRegister >::RangedForIteratorType | end () |
||
| int32 | FindOrAddScriptStruct
(
UScriptStruct* InScriptStruct |
Ensures to add a script struct to the internal map if needed. | |
| int32 | GetIndex
(
const FName& InName |
Returns the index of a register based on the register name. | |
| ERigVMMemoryType | Returns the memory type of this container | ||
| FRigVMOperand | GetOperand
(
int32 InRegisterIndex, |
Returns an argument for a given register. | |
| FRigVMOperand | GetOperand
(
int32 InRegisterIndex, |
Returns an argument for a given register. | |
| int32 | GetOrAddRegisterOffset
(
int32 InRegisterIndex, |
Adds a register path and returns its index. | |
| int32 | GetOrAddRegisterOffset
(
int32 InRegisterIndex, |
Adds a register path and returns its index. | |
| int32 | GetOrAddRegisterOffset
(
int32 InRegisterIndex, |
Adds a register path and returns its index. | |
| const FRigVMRegister & | GetRegister
(
const FName& InName |
Const accessor for a register based on a a name. note: only works if SupportsNames() == true | |
| const FRigVMRegister & | GetRegister
(
const FRigVMOperand& InArg |
Const accessor for a register based on an argument | |
| FRigVMRegister & | GetRegister
(
const FName& InName |
Accessor for a register based on a a name. note: only works if SupportsNames() == true | |
| FRigVMRegister & | GetRegister
(
const FRigVMOperand& InArg |
Accessor for a register based on an argument | |
| FRigVMRegister & | GetRegister
(
int32 InIndex |
Accessor for a register based on index | |
| const FRigVMRegister & | GetRegister
(
int32 InIndex |
Const accessor for a register based on index | |
| UScriptStruct * | GetScriptStruct
(
int32 InRegisterIndex, |
Returns the script struct used for a given register index (can be nullptr for non-struct-registers). | |
| UScriptStruct * | GetScriptStruct
(
const FRigVMRegister& Register |
Returns the script struct used for a given register (can be nullptr for non-struct-registers). | |
| bool | IsNameAvailable
(
const FName& InPotentialNewName |
Returns true if a given name is available for a new register. | |
| void | Load
(
FArchive& Ar |
||
| int32 | Num () |
Returns the number of registers in this container | |
| void | Reset () |
Resets the container but maintains storage. | |
| void | Save
(
FArchive& Ar |
||
| void | Serialize
(
FArchive& Ar |
||
| void | SetMemoryType
(
ERigVMMemoryType InMemoryType |
Sets the memory type. should only be used when the container is empty | |
| bool | Returns true if this container supports name based lookup | ||
| void | Updates internal data for topological changes. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| const FRigVMRegister & | operator[]
(
const FRigVMOperand& InArg |
Const accessor for a register based on an argument | |
| FRigVMRegister & | operator[]
(
int32 InIndex |
Accessor for a register based on index | |
| const FRigVMRegister & | operator[]
(
int32 InIndex |
Const accessor for a register based on index | |
| FRigVMRegister & | operator[]
(
const FRigVMOperand& InArg |
Accessor for a register based on an argument | |
| FRigVMRegister & | operator[]
(
const FName& InName |
Accessor for a register based on a a name. note: only works if SupportsNames() == true | |
| const FRigVMRegister & | operator[]
(
const FName& InName |
Const accessor for a register based on a a name. note: only works if SupportsNames() == true | |
| FRigVMMemoryContainer & | operator=
(
const FRigVMMemoryContainer& InOther |