LeviLamina
Loading...
Searching...
No Matches
EntitySystems.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
7#include "mc/deps/core/utility/typeid_t.h"
8#include "mc/deps/ecs/systems/IEntitySystems.h"
9#include "mc/deps/game_refs/OwnerPtr.h"
10#include "mc/deps/game_refs/StackRefResult.h"
11#include "mc/deps/profiler/PredeclaredAnnotation.h"
12
13// auto generated forward declare list
14// clang-format off
16class EntityContext;
17class EntityRegistry;
18class ITickingSystem;
23struct SystemCategory;
24struct SystemInfo;
25struct TickingSystemId;
27// clang-format on
28
29class EntitySystems : public ::IEntitySystems, public ::Bedrock::EnableNonOwnerReferences {
30public:
31 // EntitySystems inner types declare
32 // clang-format off
34 struct GameSystemCategory;
35 struct RuntimeInitialize;
38 // clang-format on
39
40 // EntitySystems inner types define
42
44
46
48
50
51 using MovementSystemCategory = ::entt::
52 type_list<::EntitySystems::UsedInServerPlayerMovement, ::EntitySystems::UsedInClientMovementCorrections>;
53
54 using SystemInvokeCallbackFunc = ::std::function<void(::TickingSystemId)>;
55
56 using SystemInvokeCallbackPair =
57 ::std::pair<::std::function<void(::TickingSystemId)>, ::std::function<void(::TickingSystemId)>>;
58
59 using SystemInvokeCallbackSig = void(::TickingSystemId);
60
61 using TotalTickCallbackFunc = ::std::function<void()>;
62
63 using TotalTickCallbackPair = ::std::pair<::std::function<void()>, ::std::function<void()>>;
64
65 using TotalTickCallbackSig = void();
66
67public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerInteractionSystem>> mPlayerInteractionSystem;
71 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IEntitySystemsCollection>> mSystems;
72 ::ll::TypedStorage<8, 16, ::OwnerPtr<::EcsEventDispatcher>> mDispatcher;
73 ::ll::TypedStorage<8, 32, ::std::string> mName;
74 ::ll::TypedStorage<1, 1, bool> mEnableTimingCapture;
75 ::ll::TypedStorage<8, 64, ::std::function<void()>> mPreTotalTick;
76 ::ll::TypedStorage<8, 64, ::std::function<void()>> mPostTotalTick;
77 ::ll::TypedStorage<8, 64, ::std::function<void(::TickingSystemId)>> mPreSystemInvoke;
78 ::ll::TypedStorage<8, 64, ::std::function<void(::TickingSystemId)>> mPostSystemInvoke;
79 ::ll::TypedStorage<8, 8, ::Bedrock::Profiler::details::PredeclaredAnnotation> mTickingAnnotation;
80 // NOLINTEND
81
82public:
83 // prevent constructor by default
84 EntitySystems();
85
86public:
87 // virtual functions
88 // NOLINTBEGIN
89 virtual ~EntitySystems() /*override*/;
90
91 virtual void tickMovementCatchup(::EntityRegistry& registry) /*override*/;
92
93 virtual void tickMovementCorrectionReplay(::EntityRegistry& registry) /*override*/;
94
95 virtual void registerTickingSystem(
96 ::gsl::span<::Bedrock::typeid_t<::SystemCategory> const> categories,
97 ::std::unique_ptr<::ITickingSystem> system,
98 ::SystemInfo const& info,
100 ) /*override*/;
101
102 virtual bool _hasSingleTickCategory(::Bedrock::typeid_t<::SystemCategory> const category) const /*override*/;
103 // NOLINTEND
104
105public:
106 // member functions
107 // NOLINTBEGIN
108 MCAPI explicit EntitySystems(::std::string_view name);
109
110 MCAPI EntitySystems(::std::unique_ptr<::IEntitySystemsCollection> systems, ::std::string_view name);
111
112 MCAPI void _singleTickCategory(::Bedrock::typeid_t<::SystemCategory> category, ::EntityContext& context);
113
114 MCAPI void _singleTickCategory(
116 ::StrictEntityContext& entity,
117 ::EntityRegistry& registry
118 );
119
120#ifdef LL_PLAT_C
121 MCFOLD ::StackRefResult<::EcsEventDispatcher> getDispatcher();
122#endif
123
124 MCFOLD ::PlayerInteractionSystem& getPlayerInteractionSystem();
125
126 MCAPI ::std::vector<::gsl::not_null<::SystemInfo const*>>
127 getSystemInfo(::Bedrock::typeid_t<::SystemCategory> const& filter) const;
128
129#ifdef LL_PLAT_C
130 MCAPI ::SystemInfo const* getSystemInfoForTickingSystemId(::TickingSystemId id) const;
131
132 MCAPI ::TickingSystemId getTickingSystemIdFromIndex(uint64 index) const;
133#endif
134
135 MCAPI void registerEditorOnlyTickingSystem(::TickingSystemWithInfo&& system);
136
137 MCAPI void registerEvents(::EntityRegistry& registry);
138
139 MCAPI void registerGameOnlyMovementTickingSystem(::TickingSystemWithInfo&& system);
140
141 MCAPI void registerGameOnlyTickingSystem(::TickingSystemWithInfo&& system);
142
143 MCAPI void registerMovementTickingSystem(::TickingSystemWithInfo&& system);
144
145 MCAPI void registerTickingSystem(::TickingSystemWithInfo&& system);
146
147#ifdef LL_PLAT_C
148 MCAPI ::std::pair<::std::function<void(::TickingSystemId)>, ::std::function<void(::TickingSystemId)>>
149 setSystemInvokeCallbacks(
150 ::std::function<void(::TickingSystemId)>&& preInvoke,
151 ::std::function<void(::TickingSystemId)>&& postInvoke
152 );
153
154 MCAPI ::std::pair<::std::function<void()>, ::std::function<void()>>
155 setTotalTickCallbacks(::std::function<void()>&& preTick, ::std::function<void()>&& postTick);
156#endif
157
158 MCAPI void tick(::EntityRegistry& registry);
159
160 MCAPI void tickEditor(::EntityRegistry& registry);
161
162 MCAPI void tickInitialize(::EntityRegistry& registry);
163 // NOLINTEND
164
165public:
166 // constructor thunks
167 // NOLINTBEGIN
168 MCAPI void* $ctor(::std::string_view name);
169
170 MCAPI void* $ctor(::std::unique_ptr<::IEntitySystemsCollection> systems, ::std::string_view name);
171 // NOLINTEND
172
173public:
174 // destructor thunk
175 // NOLINTBEGIN
176 MCAPI void $dtor();
177 // NOLINTEND
178
179public:
180 // virtual function thunks
181 // NOLINTBEGIN
182 MCAPI void $tickMovementCatchup(::EntityRegistry& registry);
183
184 MCAPI void $tickMovementCorrectionReplay(::EntityRegistry& registry);
185
186 MCAPI void $registerTickingSystem(
187 ::gsl::span<::Bedrock::typeid_t<::SystemCategory> const> categories,
188 ::std::unique_ptr<::ITickingSystem> system,
189 ::SystemInfo const& info,
190 ::EntitySystemTickingMode tickingMode
191 );
192
193 MCAPI bool $_hasSingleTickCategory(::Bedrock::typeid_t<::SystemCategory> const category) const;
194
195
196 // NOLINTEND
197
198public:
199 // vftables
200 // NOLINTBEGIN
202
203 MCNAPI static void** $vftableForIEntitySystems();
204 // NOLINTEND
205};
Definition EnableNonOwnerReferences.h:7
Definition typeid_t.h:39
Definition EcsEventDispatcher.h:23
Definition EntityContext.h:17
Definition EntityRegistry.h:11
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForIEntitySystems()
Definition IEntitySystems.h:17
Definition ITickingSystem.h:15
Definition PlayerInteractionSystem.h:13
Definition StrictEntityContext.h:14
Definition EntitySystemTickingMode.h:5
Definition EntitySystems.h:41
Definition EntitySystems.h:43
Definition EntitySystems.h:45
Definition EntitySystems.h:49
Definition IEntitySystemsCollection.h:21
Definition SystemCategory.h:5
Definition SystemInfo.h:13
Definition TickingSystemId.h:5
Definition TickingSystemWithInfo.h:13
Definition context.h:5