UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NetObjectGroupHandle.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Iris/IrisConfig.h"
9
10// Forward declarations
11class FString;
12
13namespace UE::Net::Private
14{
15 class FNetObjectGroups;
16}
17
18namespace UE::Net
19{
20
22{
23public:
25
26 enum { GroupIndexBits = 24U };
27 enum { EpochBits = 8U };
28 enum { EpochMask = (1U << EpochBits) - 1U };
30
33 {
38 };
39
41
43
44 // $IRIS TODO: IsValid could be considered a shortcut to Group->IsValidGroup but it's abolutely not the same thing. Rename this to IsInitialized() to remove the confusion.
46 inline bool IsValid() const { return Value != 0u; }
47
50
52 uint32 GetUniqueId() const { return UniqueId; }
53
56
59
62
65
68
70 {
71 return Value;
72 }
73
74private:
76
78 {
80 {
81 *this = FNetObjectGroupHandle();
82 }
83 else
84 {
88 }
89 }
90
91 union
92 {
94 struct
95 {
99 };
100 };
101
102 friend inline bool operator==(const FNetObjectGroupHandle& Lhs, const FNetObjectGroupHandle& Rhs) { return Lhs.Value == Rhs.Value; }
103 friend inline bool operator!=(const FNetObjectGroupHandle& Lhs, const FNetObjectGroupHandle& Rhs) { return Lhs.Value != Rhs.Value; }
104};
105
106static_assert(sizeof(FNetObjectGroupHandle) == sizeof(uint64), "FNetObjectGroupHandle must be of size 64bits.");
107
109{
110 return ::GetTypeHash(Handle.GetRawValue());
111}
112}
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NetObjectGroupHandle.h:22
bool IsReservedNetObjectGroup() const
Definition NetObjectGroupHandle.h:58
uint32 FGroupIndexType
Definition NetObjectGroupHandle.h:24
uint32 Index
Definition NetObjectGroupHandle.h:96
bool IsNetGroupOwnerNetObjectGroup() const
Definition NetObjectGroupHandle.h:64
@ EpochMask
Definition NetObjectGroupHandle.h:28
@ EpochBits
Definition NetObjectGroupHandle.h:27
static FNetObjectGroupHandle GetInvalid()
Definition NetObjectGroupHandle.h:40
static bool IsReservedNetObjectGroupIndex(FGroupIndexType GroupIndex)
Definition NetObjectGroupHandle.h:55
friend bool operator!=(const FNetObjectGroupHandle &Lhs, const FNetObjectGroupHandle &Rhs)
Definition NetObjectGroupHandle.h:103
bool IsNetGroupReplayNetObjectGroup() const
Definition NetObjectGroupHandle.h:67
uint32 UniqueId
Definition NetObjectGroupHandle.h:98
FGroupIndexType GetGroupIndex() const
Definition NetObjectGroupHandle.h:49
@ MaxGroupIndexCount
Definition NetObjectGroupHandle.h:29
uint32 GetUniqueId() const
Definition NetObjectGroupHandle.h:52
uint64 GetRawValue() const
Definition NetObjectGroupHandle.h:69
uint32 Epoch
Definition NetObjectGroupHandle.h:97
@ GroupIndexBits
Definition NetObjectGroupHandle.h:26
bool IsValid() const
Definition NetObjectGroupHandle.h:46
@ NetGroupOwnerNetObjectGroupIndex
Definition NetObjectGroupHandle.h:36
@ NotReplicatedNetObjectGroupIndex
Definition NetObjectGroupHandle.h:35
@ InvalidNetObjectGroupIndex
Definition NetObjectGroupHandle.h:34
@ NetGroupReplayNetObjectGroupIndex
Definition NetObjectGroupHandle.h:37
friend bool operator==(const FNetObjectGroupHandle &Lhs, const FNetObjectGroupHandle &Rhs)
Definition NetObjectGroupHandle.h:102
bool IsNotReplicatedNetObjectGroup() const
Definition NetObjectGroupHandle.h:61
FNetObjectGroupHandle()
Definition NetObjectGroupHandle.h:42
uint64 Value
Definition NetObjectGroupHandle.h:93
Definition NetObjectGroups.h:52
Definition NetworkVersion.cpp:28
Definition NetworkVersion.cpp:28
uint32 GetTypeHash(const FNetIDVariant &NetID)
Definition NetIDVariant.h:55
U16 Index
Definition radfft.cpp:71