LeviLamina
Loading...
Searching...
No Matches
EntityRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/ecs/EntityId.h"
7#include "mc/deps/game_refs/EnableGetWeakRef.h"
8
9class EntityRegistry : public ::EnableGetWeakRef<::EntityRegistry>,
10 public ::std::enable_shared_from_this<::EntityRegistry> {
11public:
12 // EntityRegistry inner types define
13 using Base = ::entt::basic_registry<::EntityId>;
14
15 using BaseShared = ::std::enable_shared_from_this<::EntityRegistry>;
16
18
19 using EntityInvokeCallbackFunc = ::std::function<void(::EntityId)>;
20
21 using EntityInvokeCallbackPair = ::std::pair<::std::function<void(::EntityId)>, ::std::function<void(::EntityId)>>;
22
23 using EntityInvokeCallbackSig = void(::EntityId);
24
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 32, ::std::string> mDebugName;
29 ::ll::TypedStorage<8, 304, ::entt::basic_registry<::EntityId>> mRegistry;
30 ::ll::TypedStorage<4, 4, uint> mId;
31 ::ll::TypedStorage<8, 64, ::std::function<void(::EntityId)>> mPreEntityInvoke;
32 ::ll::TypedStorage<8, 64, ::std::function<void(::EntityId)>> mPostEntityInvoke;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 EntityRegistry();
38
39public:
40 // member functions
41 // NOLINTBEGIN
42 MCNAPI explicit EntityRegistry(::std::string identifier);
43
44 MCNAPI void postViewEachCount(uint64 count);
45
46#ifdef LL_PLAT_C
47 MCNAPI ::std::pair<::std::function<void(::EntityId)>, ::std::function<void(::EntityId)>> setEntityInvokeCallbacks(
48 ::std::function<void(::EntityId)>&& preInvoke,
49 ::std::function<void(::EntityId)>&& postInvoke
50 );
51#endif
52
54 // NOLINTEND
55
56public:
57 // static variables
58 // NOLINTBEGIN
59 MCNAPI static ::std::atomic<uint>& mRegistryCount();
60 // NOLINTEND
61
62public:
63 // constructor thunks
64 // NOLINTBEGIN
65 MCNAPI void* $ctor(::std::string identifier);
66 // NOLINTEND
67
68public:
69 // destructor thunk
70 // NOLINTBEGIN
71 MCNAPI void $dtor();
72 // NOLINTEND
73};
Definition EnableGetWeakRef.h:6
Definition EntityId.h:13
MCAPI void * $ctor(::std::string identifier)
MCAPI ~EntityRegistry()
static MCAPI ::std::atomic< uint > & mRegistryCount()
MCAPI EntityRegistry(::std::string identifier)
MCAPI void postViewEachCount(uint64 count)
MCAPI void $dtor()