Module |
|
Header |
/Engine/Source/Runtime/RigVM/Public/RigVMCore/RigVMMemory.h |
Include |
#include "RigVMCore/RigVMMemory.h" |
struct FRigVMMemoryContainer
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. Plain types (shallow types without the need for construction) can be added and retrieved using the methods suffixed with 'Plain'.
For example: int32 Index = Container.AddPlain<float>(4.f); float& ValueRef = Container.GetRef<float>(Index);
This can also be done with arrays: TArray<float> MyArray = {3.f, 4.f, 5.f}; int32 Index = Container.AddPlainArray<float>(MyArray); TArrayView<float> ArrayView = Container.GetArray<float>(Index);
More complex data structures such as USTRUCT types need to be stored with the 'Struct' suffixed methods - since they require a constructor / destructor to be called.
For example: FMyStruct MyStruct; int32 Index = Container.AddStruct<FMyStruct>(MyStruct); FMyStruct& ValueRef = Container.GetRef<FMyStruct>(Index);
Name | Description | |
---|---|---|
|
FRigVMMemoryContainer ( |
|
|
FRigVMMemoryContainer ( |
Name | Description | |
---|---|---|
|
~FRigVMMemoryContainer() |
Name | Description | ||
---|---|---|---|
|
AddPlain |
Adds a new named register for a typed plain value from a value reference. |
|
|
AddPlain ( |
Adds a new unnamed register for a typed plain value from a value reference. |
|
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
Adds a new named register for a typed plain array from an array view (used by compiler) |
|
|
AddPlainArray ( |
Adds a new unnamed register for a typed plain array from an array view. |
|
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddPlainArray ( |
||
|
AddStruct |
Adds a new named register for a typed struct given a value reference. |
|
|
AddStruct ( |
Adds a new unnamed register for a typed struct given a value reference. |
|
|
AddStructArray ( |
Adds a new named register for a typed struct array given a value reference. |
|
|
AddStructArray ( |
Adds a new named register for a typed struct array given a TArray. |
|
|
begin() |
||
|
begin() |
||
|
ChangeRegisterType |
Changes the type of a register provided a new type and a data pointer. |
|
|
ChangeRegisterType |
||
|
ChangeRegisterType |
||
|
ChangeRegisterType |
Changes the type of a register provided a new type and a data pointer. |
|
|
Copy ( |
Copies the content of a source register to a target register. |
|
|
Copy ( |
Copies the content of a source register to a target register. |
|
|
Copy ( |
Copies the content of a source register to a target register. |
|
|
Empty() |
Resets the container and removes all storage. |
|
|
end() |
||
|
end() |
||
|
T * |
Get |
Returns the current typed pointer for a given register index Note: This refers to the active slice - and can change over time. |
|
T * |
Get ( |
Returns the current typed pointer for a given register Note: This refers to the active slice - and can change over time. |
|
T * |
Get ( |
Returns the current typed pointer for a given argument Note: This refers to the active slice - and can change over time. |
|
const T *... |
Get |
Returns the current const typed pointer for a given register index. |
|
const T *... |
Get ( |
Returns the current const typed pointer for a given register. |
|
const T *... |
Get ( |
Returns the current const typed pointer for a given argument Note: This refers to the active slice - and can change over time. |
|
TArrayView< ... |
GetArray |
Returns an array view for all elements of the current slice for a given register index. |
|
TArrayView< ... |
GetArray ( |
Returns an array view for all elements of the current slice for a given register. |
|
TArrayView< ... |
GetArray ( |
Returns an array view for all elements of the current slice for a given argument. |
|
uint8 * |
GetData |
Returns the current data pointer for a given register index. |
|
uint8 * |
GetData ( |
Returns the current data pointer for a given register. |
|
const uint8 ... |
GetData |
Returns the current const data pointer for a given register index. |
|
const uint8 ... |
GetData ( |
Returns the current const data pointer for a given register. |
|
GetIndex ( |
Returns the index of a register based on the register name. |
|
|
ERigVMMemory... |
GetMemoryType() |
Returns the memory type of this container |
|
FRigVMOperan... |
GetOperand |
Returns an argument for a given register. |
|
FRigVMOperan... |
GetOperand |
Returns an argument for a given register. |
|
GetOrAddRegisterOffset ( |
Adds a register path and returns its index. |
|
|
T & |
GetRef |
Returns the current typed reference for a given register index Note: This refers to the active slice - and can change over time. |
|
T & |
GetRef ( |
Returns the current typed reference for a given register Note: This refers to the active slice - and can change over time. |
|
T & |
GetRef ( |
Returns the current typed reference for a given argument Note: This refers to the active slice - and can change over time. |
|
const T & |
GetRef ( |
Returns the current const typed reference for a given register Note: This refers to the active slice - and can change over time. |
|
const T & |
GetRef ( |
Returns the current const typed reference for a given argument Note: This refers to the active slice - and can change over time. |
|
const T & |
GetRef |
Returns the current const typed reference for a given register index Note: This refers to the active slice - and can change over time. |
|
const FRigVM... |
GetRegister ( |
Const accessor for a register based on a a name. note: only works if SupportsNames() == true |
|
const FRigVM... |
GetRegister ( |
Const accessor for a register based on index |
|
FRigVMRegist... |
GetRegister ( |
Accessor for a register based on index |
|
const FRigVM... |
GetRegister ( |
Const accessor for a register based on an argument |
|
FRigVMRegist... |
GetRegister ( |
Accessor for a register based on an argument |
|
FRigVMRegist... |
GetRegister ( |
Accessor for a register based on a a name. note: only works if SupportsNames() == true |
|
GetRegisterValueAsString ( |
||
|
UScriptStruc... |
GetScriptStruct |
Returns the script struct used for a given register index (can be nullptr for non-struct-registers). |
|
UScriptStruc... |
GetScriptStruct ( |
Returns the script struct used for a given register (can be nullptr for non-struct-registers). |
|
FRigVMMemory... |
GetStatistics() |
Returns the statistics information |
|
IsNameAvailable ( |
Returns true if a given name is available for a new register. |
|
|
Num() |
Returns the number of registers in this container |
|
|
Remove ( |
Remove a register given its index. |
|
|
Remove ( |
Remove a register given its name Note: This only works if SupportsNames() == true |
|
|
Rename |
Remove a register given its old name Note: This only works if SupportsNames() == true |
|
|
Rename |
Remove a register given its index Note: This only works if SupportsNames() == true |
|
|
Reset() |
Resets the container but maintains storage. |
|
|
Resize |
Resize a register given its name Note: This only works if SupportsNames() == true |
|
|
Resize |
Resize a register given its index. |
|
|
Serialize ( |
||
|
SetMemoryType ( |
Sets the memory type. should only be used when the container is empty |
|
|
SetRegisterValueFromString ( |
||
|
SupportsNames() |
Returns true if this container supports name based lookup |
Name | Description | ||
---|---|---|---|
|
FRigVMRegist... |
operator[] ( |
Accessor for a register based on index |
|
const FRigVM... |
operator[] ( |
Const accessor for a register based on an argument |
|
FRigVMRegist... |
operator[] ( |
Accessor for a register based on an argument |
|
const FRigVM... |
operator[] ( |
Const accessor for a register based on index |
|
FRigVMRegist... |
operator[] ( |
Accessor for a register based on a a name. note: only works if SupportsNames() == true |
|
const FRigVM... |
operator[] ( |
Const accessor for a register based on a a name. note: only works if SupportsNames() == true |
|
FRigVMMemory... |
operator= ( |