UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PushModelPerObjectState.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#if WITH_PUSH_MODEL
8
9#include "CoreMinimal.h"
11#include "PushModelUtils.h"
14#include "UObject/ObjectKey.h"
15
16namespace UEPushModelPrivate
17{
23 {
24 public:
25
33 : ObjectKey(InObjectKey)
36 {
37 }
38
40 : ObjectKey(Other.ObjectKey)
44 {
45 Other.bHasDirtyProperties = false;
46 }
47
50
57 {
59 {
60 NetDriverObject.SetRecentlyCollectedGarbage();
61 }
62 }
63
64 void MarkPropertyDirty(const uint16 RepIndex)
65 {
66 DirtiedThisFrame[RepIndex] = true;
68 }
69
75 {
77 {
79 {
80 NetDriverObject.MarkPropertiesDirty(DirtiedThisFrame);
81 }
82
84 bHasDirtyProperties = false;
85 }
86 }
87
89 {
91 }
92
94 {
96 }
97
99 {
100 FSparseArrayAllocationInfo AllocationInfo = PerNetDriverStates.AddUninitialized();
101 new (AllocationInfo.Pointer) FPushModelPerNetDriverState(static_cast<uint16>(DirtiedThisFrame.Num()));
102
103 return AllocationInfo.Index;
104 }
105
107 {
109 }
110
111 const bool HasAnyNetDriverStates()
112 {
113 return PerNetDriverStates.Num() != 0;
114 }
115
116 void CountBytes(FArchive& Ar) const
117 {
118 DirtiedThisFrame.CountBytes(Ar);
119 PerNetDriverStates.CountBytes(Ar);
121 {
122 PerNetDriverState.CountBytes(Ar);
123 }
124 }
125
126 const int32 GetNumberOfProperties() const
127 {
128 return DirtiedThisFrame.Num();
129 }
130
131 const FObjectKey& GetObjectKey() const
132 {
133 return ObjectKey;
134 }
135
136 bool HasDirtyProperties() const
137 {
138 return bHasDirtyProperties;
139 }
140
141 private:
142
144 const FObjectKey ObjectKey;
145
150
153
155 };
156}
157
158#endif
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
Definition Archive.h:1208
Definition SparseArray.h:524
Definition RepLayout.cpp:129
UEPushModelPrivate::FPushModelPerNetDriverState * GetPerNetDriverState(const FRepChangelistState *ChangelistState)
Definition RepLayout.cpp:249
Definition ObjectKey.h:19
Definition SparseArray.h:31
int32 Index
Definition SparseArray.h:32
void * Pointer
Definition SparseArray.h:33