LeviLamina
Loading...
Searching...
No Matches
QueryRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/binding/ECapabilities.h"
7#include "mc/client/gui/oreui/binding/IdType.h"
8#include "mc/client/gui/oreui/binding/interface/IBindable.h"
9#include "mc/deps/core/utility/pub_sub/Subscription.h"
10#include "mc/platform/brstd/flat_map.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace OreUI::Debug { struct QueryInformation; }
15namespace OreUI::Detail { class Binder; }
16namespace OreUI::Detail { class IHandlerFactory; }
17namespace OreUI::Detail { class IQuery; }
18// clang-format on
19
20namespace OreUI::Detail {
21
22class QueryRegistry : public ::OreUI::Detail::IBindable {
23public:
24 // QueryRegistry inner types declare
25 // clang-format off
26 class QueryTemplate;
27 class LiveQuery;
28 struct DirtyQuery;
29 // clang-format on
30
31 // QueryRegistry inner types define
32 class QueryTemplate {
33 public:
34 // QueryTemplate inner types define
35 using FactoryPtr = ::std::unique_ptr<::OreUI::Detail::IHandlerFactory>;
36
37 public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Detail::IHandlerFactory>> mHandlerFactory;
41 ::ll::TypedStorage<8, 8, void*> mHandle;
42 // NOLINTEND
43 };
44
45 class LiveQuery {
46 public:
47 // LiveQuery inner types define
48 enum class EQueryState : uint {
49 Unknown = 0,
50 Active = 1,
51 Deleted = 2,
52 };
53
54 public:
55 // member variables
56 // NOLINTBEGIN
57 ::ll::TypedStorage<8, 8, ::OreUI::Detail::IdType> mId;
58 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Detail::IQuery>> mQuery;
59 ::ll::TypedStorage<8, 8, ::OreUI::Detail::QueryRegistry*> mRegistry;
60 ::ll::TypedStorage<4, 4, int> mRank;
61 ::ll::TypedStorage<1, 1, ::OreUI::ECapabilities> mCapabilities;
62 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mToken;
63 ::ll::TypedStorage<4, 4, ::OreUI::Detail::QueryRegistry::LiveQuery::EQueryState> mState;
64 // NOLINTEND
65
66 public:
67 // prevent constructor by default
68 LiveQuery& operator=(LiveQuery const&);
69 LiveQuery(LiveQuery const&);
70 LiveQuery();
71
72 public:
73 // member functions
74 // NOLINTBEGIN
75 MCAPI LiveQuery(::OreUI::Detail::QueryRegistry::LiveQuery&& other);
76
77 MCAPI LiveQuery(
78 ::OreUI::Detail::Binder const& binder,
79 ::OreUI::Detail::IdType const& id,
80 ::OreUI::ECapabilities capabilities,
81 ::std::unique_ptr<::OreUI::Detail::IQuery> query,
82 ::OreUI::Detail::QueryRegistry* registry,
83 int rank
84 );
85
86 MCAPI ::OreUI::Detail::QueryRegistry::LiveQuery& operator=(::OreUI::Detail::QueryRegistry::LiveQuery&& other);
87
88 MCAPI ~LiveQuery();
89 // NOLINTEND
90
91 public:
92 // constructor thunks
93 // NOLINTBEGIN
94 MCAPI void* $ctor(::OreUI::Detail::QueryRegistry::LiveQuery&& other);
95
96 MCAPI void* $ctor(
97 ::OreUI::Detail::Binder const& binder,
98 ::OreUI::Detail::IdType const& id,
99 ::OreUI::ECapabilities capabilities,
100 ::std::unique_ptr<::OreUI::Detail::IQuery> query,
101 ::OreUI::Detail::QueryRegistry* registry,
102 int rank
103 );
104 // NOLINTEND
105
106 public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCAPI void $dtor();
110 // NOLINTEND
111 };
112
113 struct DirtyQuery {
114 public:
115 // member variables
116 // NOLINTBEGIN
117 ::ll::TypedStorage<8, 8, ::OreUI::Detail::IdType> id;
118 ::ll::TypedStorage<4, 4, int> rank;
119 ::ll::TypedStorage<
120 8,
121 8,
122 ::std::reference_wrapper<::brstd::flat_map<
123 ::OreUI::Detail::IdType,
124 ::OreUI::Detail::QueryRegistry::LiveQuery,
125 ::std::less<::OreUI::Detail::IdType>,
126 ::std::vector<::OreUI::Detail::IdType>,
127 ::std::vector<::OreUI::Detail::QueryRegistry::LiveQuery>>>>
128 container;
129 // NOLINTEND
130 };
131
132 using QueryPtr = ::std::unique_ptr<::OreUI::Detail::IQuery>;
133
134public:
135 // member variables
136 // NOLINTBEGIN
137 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::OreUI::Detail::Binder>> mBinder;
138 ::ll::TypedStorage<8, 8, void*> mDestroyHandle;
139 ::ll::TypedStorage<1, 1, bool> mPurgeQueries;
140 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::OreUI::Detail::QueryRegistry::QueryTemplate>>
141 mQueryTemplates;
142 ::ll::TypedStorage<
143 8,
144 48,
145 ::brstd::flat_map<
146 ::OreUI::Detail::IdType,
147 ::OreUI::Detail::QueryRegistry::LiveQuery,
148 ::std::less<::OreUI::Detail::IdType>,
149 ::std::vector<::OreUI::Detail::IdType>,
150 ::std::vector<::OreUI::Detail::QueryRegistry::LiveQuery>>>
151 mReactiveQueries;
152 ::ll::TypedStorage<
153 8,
154 48,
155 ::brstd::flat_map<
156 ::OreUI::Detail::IdType,
157 ::OreUI::Detail::QueryRegistry::LiveQuery,
158 ::std::less<::OreUI::Detail::IdType>,
159 ::std::vector<::OreUI::Detail::IdType>,
160 ::std::vector<::OreUI::Detail::QueryRegistry::LiveQuery>>>
161 mDynamicQueries;
162 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::Detail::QueryRegistry::DirtyQuery>> mDirtyQueries;
163 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::Detail::QueryRegistry::LiveQuery>> mAdditionQueue;
164 ::ll::TypedStorage<1, 1, bool> mIterating;
165 // NOLINTEND
166
167public:
168 // prevent constructor by default
169 QueryRegistry();
170
171public:
172 // virtual functions
173 // NOLINTBEGIN
174 virtual ~QueryRegistry() /*override*/;
175
176 virtual void onReadyForBindings() /*override*/;
177
178 virtual void onSuspend() /*override*/;
179
180 virtual void onBindingsReleased() /*override*/;
181
182 virtual void update(double const time) /*override*/;
183 // NOLINTEND
184
185public:
186 // member functions
187 // NOLINTBEGIN
188 MCAPI explicit QueryRegistry(::OreUI::Detail::Binder& binder);
189
190 MCAPI void _createQuery(
191 ::OreUI::Detail::IdType const& id,
192 ::OreUI::ECapabilities capabilities,
193 ::std::unique_ptr<::OreUI::Detail::IQuery> query,
194 int rank
195 );
196
197 MCAPI void _syncQueries();
198
199 MCAPI ::std::vector<::OreUI::Debug::QueryInformation> getQueryInformation() const;
200 // NOLINTEND
201
202public:
203 // constructor thunks
204 // NOLINTBEGIN
205 MCAPI void* $ctor(::OreUI::Detail::Binder& binder);
206 // NOLINTEND
207
208public:
209 // destructor thunk
210 // NOLINTBEGIN
211 MCAPI void $dtor();
212 // NOLINTEND
213
214public:
215 // virtual function thunks
216 // NOLINTBEGIN
217 MCAPI void $onReadyForBindings();
218
219 MCAPI void $onSuspend();
220
221 MCFOLD void $onBindingsReleased();
222
223 MCAPI void $update(double const time);
224 // NOLINTEND
225
226public:
227 // vftables
228 // NOLINTBEGIN
229 MCNAPI static void** $vftable();
230 // NOLINTEND
231};
232
233} // namespace OreUI::Detail
Definition Binder.h:7
Definition IHandlerFactory.h:7
Definition IQuery.h:7
Definition QueryRegistry.h:19
Definition QueryRegistry.h:17
Definition QueryRegistry.h:7
static MCAPI void ** $vftable()
Definition QueryInformation.h:7
Definition QueryRegistry.h:25