Navigation
API > API/Runtime > API/Runtime/IrisCore > API/Runtime/IrisCore/Iris > API/Runtime/IrisCore/Iris/ReplicationState
References
| Module | IrisCore |
| Header | /Engine/Source/Runtime/Experimental/Iris/Core/Public/Iris/ReplicationState/PropertyReplicationState.h |
| Include | #include "Iris/ReplicationState/PropertyReplicationState.h" |
Syntax
class FPropertyReplicationState
Remarks
ReplicationState created at runtime using a descriptor built from existing reflection data StateBuffer contains storage for all properties described by the descriptor, When polling data from the source object properties we will compare the value with what we have stored in the statebuffer and mark the member as dirty.if the value differs
Polling is quite expensive but we only do it once per update of the replication system
Constructors
| Type | Name | Description | |
|---|---|---|---|
FPropertyReplicationState
(
const FReplicationStateDescriptor* Descriptor |
Construct a new state, StateBuffer will be allocated and constructed according to data in the descriptor | ||
FPropertyReplicationState
(
const FPropertyReplicationState& Other |
Copy constructor, will not copy internal data | ||
FPropertyReplicationState
(
const FReplicationStateDescriptor* Descriptor, |
Construct a new state, using already constructed state in InStateBuffer |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CallRepNotifies
(
void*RESTRICT DstData, |
||
| void | CallRepNotifies
(
void*RESTRICT DstData, |
Invoke repnotifies for all dirty members | |
| void | CopyDirtyProperties
(
const FPropertyReplicationState& Other |
Copy dirty properties from the other state including changemask | |
| void | GetPropertyValue
(
uint32 Index, |
Retrieve the value at the provided Index by writing it to DstValue. | |
| const FReplicationStateDescriptor * | |||
| uint8 * | |||
| bool | IsCustomConditionEnabled
(
uint32 Index |
If state has custom conditionals then this function will check whether the condition is enabled or not. | |
| bool | Is the property at the given index dirty, for properties with multiple bits in the statemask this will return true if any of those bits are set | ||
| bool | IsValid () |
Either StateBuffer is initialized and owned by this instance, or we have been injected with a state from the network system A default constructed state is not valid | |
| void | MarkArrayDirty
(
uint32 Index |
Explicitly mark an array at the given Index as dirty. | |
| void | Explicitly mark the property at the given Index as dirty, for properties with multiple bits in the statemask this will mark all bits dirty | ||
| bool | PollObjectReferences
(
const void*RESTRICT SrcData |
Poll data from object referencing properties in SrcData, Note: SrcData is a UObject containing properties. | |
| bool | PollPropertyReplicationState
(
const void*RESTRICT SrcData |
$IRIS TODO: Move Poll/Push/CallRepNotifies out of PropertyReplicationState as loose functions Poll src data from properties in SrcData, where SrcData is a UClass/UStruct containing properties. | |
| void | PushPropertyReplicationState
(
const UObject* Owner, |
Push received state data to properties in DstData buffer. | |
| void | Set
(
const FPropertyReplicationState& Other |
Set from Other this will update dirtiness by comparing all properties | |
| void | SetPropertyValue
(
uint32 Index, |
Note: There is little to none error checking in the methods below, they are mostly intended to be used from internal code and tests Expected usage for this type of ReplicationState is through the polling system Set the value at the provided Index, The UProperty is looked up from the descriptor using the index, if the value differs the statemask is updated Mostly intended for test code Normal use of this class is through the poll layer TODO: It would be nice if we could provide some validation on property types | |
| bool | StoreCurrentPropertyReplicationStateForRepNotifies
(
const void*RESTRICT SrcData, |
Certain rep notifies requires the current state to be stored before we overwrite it, this method will copy property values from src data, , where SrcData is a UClass/UStruct containing properties if the property is marked as dirty in NewStateToBeApplied | |
| FString | ToString
(
bool bIncludeAll |
Debug output state to FString | |
| const TCHAR * | ToString
(
FStringBuilderBase& StringBuilder, |
Debug output state to StringBuilder |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FPropertyReplicationState & | operator=
(
const FPropertyReplicationState& Other |
Assignment operator, it is debatable if this should be provided or not. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FCallRepNotifiesParameters |
Enums
| Type | Name | Description | |
|---|---|---|---|
| API/Runtime/IrisCore/Iris/ReplicationState/FPropertyReplicationState_1 |