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
68 virtual ~CommandRegistry() /*override*/;
69 // NOLINTEND
70
71public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI void registerCommandTemplate(
75 ::std::string name,
76 ::std::function<::std::unique_ptr<::OreUI::Detail::ICommandGroup>()> constructor
77 );
78 // NOLINTEND
79
80public:
81 // destructor thunk
82 // NOLINTBEGIN
83 MCAPI void $dtor();
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI void $onReadyForBindings();
90
91 MCFOLD void $onSuspend();
92
93 MCFOLD void $onBindingsReleased();
94
95 MCFOLD void $update(double const time);
96 // NOLINTEND
97};
98
99} // namespace OreUI::Detail
Definition Binder.h:7
Definition CommandRegistry.h:15
Definition CommandRegistry.h:7
Definition ICommandGroup.h:7
Definition IInvocationStateTracker.h:7