LeviLamina
Loading...
Searching...
No Matches
CommandRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/client/gui/oreui/binding/interface/ICommandGroup.h"
5
6// auto generated inclusion list
7#include "mc/client/gui/oreui/binding/interface/IBindable.h"
8#include "mc/deps/core/utility/pub_sub/Subscription.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace OreUI::Detail { class Binder; }
13namespace OreUI::Detail { class ICommandGroup; }
14namespace OreUI::Detail { class IInvocationStateTracker; }
15// clang-format on
16
17namespace OreUI::Detail {
18
19class CommandRegistry : public ::OreUI::Detail::IBindable {
20public:
21 // CommandRegistry inner types declare
22 // clang-format off
23 class LiveCommands;
24 // clang-format on
25
26 // CommandRegistry inner types define
27 class LiveCommands {
28 public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Detail::ICommandGroup>> mCommands;
32 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::OreUI::Detail::IInvocationStateTracker>> mTracker;
33 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChangeToken;
34 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveToken;
35 // NOLINTEND
36
37 public:
38 // member functions
39 // NOLINTBEGIN
40 MCAPI void _enableListeners();
41 // NOLINTEND
42 };
43
44public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::OreUI::Detail::IInvocationStateTracker>> mTracker;
48 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::OreUI::Detail::Binder>> mBinder;
49 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::Detail::CommandRegistry::LiveCommands>> mCommands;
50 ::ll::TypedStorage<
51 8,
52 64,
53 ::std::unordered_map<::std::string, ::std::function<::std::unique_ptr<::OreUI::Detail::ICommandGroup>()>>>
54 mCommandTemplates;
55 // NOLINTEND
56
57public:
58 // virtual functions
59 // NOLINTBEGIN
60 virtual void onReadyForBindings() /*override*/;
61
62 virtual void onSuspend() /*override*/;
63
64 virtual void onBindingsReleased() /*override*/;
65
66 virtual void update(double const time) /*override*/;
67 // NOLINTEND
68
69public:
70 // member functions
71 // NOLINTBEGIN
72 MCAPI void registerCommandTemplate(
73 ::std::string name,
74 ::std::function<::std::unique_ptr<::OreUI::Detail::ICommandGroup>()> constructor
75 );
76 // NOLINTEND
77
78public:
79 // virtual function thunks
80 // NOLINTBEGIN
81 MCAPI void $onReadyForBindings();
82
83 MCFOLD void $onSuspend();
84
85 MCFOLD void $onBindingsReleased();
86
87 MCFOLD void $update(double const time);
88 // NOLINTEND
89
90public:
91 // vftables
92 // NOLINTBEGIN
93 MCNAPI static void** $vftable();
94 // NOLINTEND
95};
96
97} // namespace OreUI::Detail
Definition Binder.h:7
Definition CommandRegistry.h:15
Definition CommandRegistry.h:7
static MCAPI void ** $vftable()
Definition ICommandGroup.h:7
Definition IInvocationStateTracker.h:7