Navigation
API > API/Runtime > API/Runtime/IrisCore
Helper class to manage storage of untyped dynamic storage with arbitrary alignment in quantized data. If storage is used to store elements that themselves uses dynamic allocations the user must take care to properly free and clone such elements properly prior to and/or after changing sizes. FNetSerializerAlignedStorage is only intended to be used from within Quantized replication states that requires dynamic storage as it has very specific expectations and limitations. NOTE: A NetSerializer using FNetSerializerAlignedStorage MUST specify the trait bHasDynamicState and forward appropriate calls to Clone and Free to this class. A zero constructed state is considered valid.
| Name | FNetSerializerAlignedStorage |
| Type | class |
| Header File | /Engine/Source/Runtime/Net/Iris/Public/Iris/Serialization/NetSerializerArrayStorage.h |
| Include Path | #include "Iris/Serialization/NetSerializerArrayStorage.h" |
Syntax
class FNetSerializerAlignedStorage
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| SizeType | AllocationPolicies::FElementAllocationPolicy::SizeType | Use whatever SizeType that is typically used by FNetSerializerArrayStorage. | Iris/Serialization/NetSerializerArrayStorage.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Data | uint8 * | Iris/Serialization/NetSerializerArrayStorage.h | ||
| StorageAlignment | SizeType | An alignment of 0 isn't valid but the value is only used if there's actual data involved. | Iris/Serialization/NetSerializerArrayStorage.h | |
| StorageMaxCapacity | SizeType | Iris/Serialization/NetSerializerArrayStorage.h | ||
| StorageNum | SizeType | Iris/Serialization/NetSerializerArrayStorage.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AdjustSize
(
FNetSerializationContext& Context, |
AdjustSize - Adjust the size of FNetSerializerArrayStorage as needed The state storage in which the storage is located is expected to be in a valid state which can either be zero initialized or a previous valid state | Iris/Serialization/NetSerializerArrayStorage.h | |
void Clone
(
FNetSerializationContext& Context, |
Clone - Clone dynamic storage from Source No assumptions of the validity of the target is made, as this is typically called AFTER a memcopy is made to the target state which invalidates all dynamic data Should typically only be called from within a the implemntation of NetSerializer::CloneDynamicState() | Iris/Serialization/NetSerializerArrayStorage.h | |
void Free
(
FNetSerializationContext& Context |
Free - Free allocated memory and reset state. | Iris/Serialization/NetSerializerArrayStorage.h | |
SizeType GetAlignment() |
Iris/Serialization/NetSerializerArrayStorage.h | ||
const uint8 * GetData () |
Iris/Serialization/NetSerializerArrayStorage.h | ||
uint8 * GetData () |
Iris/Serialization/NetSerializerArrayStorage.h | ||
SizeType Num() |
Iris/Serialization/NetSerializerArrayStorage.h |