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#include "mc/deps/game_refs/WeakRef.h"
9
10class EntityRegistry : public ::EnableGetWeakRef<::EntityRegistry>,
11 public ::std::enable_shared_from_this<::EntityRegistry> {
12public:
13 // EntityRegistry inner types define
14 using Base = ::entt::basic_registry<::EntityId>;
15
16 using BaseShared = ::std::enable_shared_from_this<::EntityRegistry>;
17
19
20 using EntityInvokeCallbackFunc = ::std::function<void(::EntityId)>;
21
22 using EntityInvokeCallbackPair = ::std::pair<::std::function<void(::EntityId)>, ::std::function<void(::EntityId)>>;
23
24 using EntityInvokeCallbackSig = void(::EntityId);
25
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 32, ::std::string> mDebugName;
30 ::ll::TypedStorage<8, 304, ::entt::basic_registry<::EntityId>> mRegistry;
31 ::ll::TypedStorage<4, 4, uint> mId;
32 ::ll::TypedStorage<8, 64, ::std::function<void(::EntityId)>> mPreEntityInvoke;
33 ::ll::TypedStorage<8, 64, ::std::function<void(::EntityId)>> mPostEntityInvoke;
34 // NOLINTEND
35
36public:
37 // member functions
38 // NOLINTBEGIN
40
41 MCNAPI explicit EntityRegistry(::std::string identifier);
42
43#ifdef LL_PLAT_C
44 MCNAPI ::std::vector<uint> _getComponentIdsOfEntity(::EntityId const& context) const;
45
46 MCNAPI ::WeakRef<::EntityRegistry> getWeakRef();
47#endif
48
49 MCNAPI void postViewEachCount(uint64 count);
50
51#ifdef LL_PLAT_C
52 MCNAPI ::std::pair<::std::function<void(::EntityId)>, ::std::function<void(::EntityId)>> setEntityInvokeCallbacks(
53 ::std::function<void(::EntityId)>&& preInvoke,
54 ::std::function<void(::EntityId)>&& postInvoke
55 );
56#endif
57
58 MCNAPI void shrinkToFit();
59
61 // NOLINTEND
62
63public:
64 // static variables
65 // NOLINTBEGIN
66 MCNAPI static ::std::atomic<uint>& mRegistryCount();
67 // NOLINTEND
68
69public:
70 // constructor thunks
71 // NOLINTBEGIN
72 MCNAPI void* $ctor();
73
74 MCNAPI void* $ctor(::std::string identifier);
75 // NOLINTEND
76
77public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCNAPI void $dtor();
81 // NOLINTEND
82};
Definition EnableGetWeakRef.h:6
Definition EntityId.h:13
MCAPI EntityRegistry()
MCAPI void shrinkToFit()
MCAPI void * $ctor()
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()
Definition context.h:5