Skip to content
LeviMC
English
AutoLightDark
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
38public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::OreUI::Detail::IInvocationStateTracker>> mTracker;
42 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::OreUI::Detail::Binder>> mBinder;
43 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::OreUI::Detail::CommandRegistry::LiveCommands>>
44 mCommands;
45 ::ll::TypedStorage<
46 8,
47 64,
48 ::std::unordered_map<::std::string, ::std::function<::std::unique_ptr<::OreUI::Detail::ICommandGroup>()>>>
49 mCommandTemplates;
50 // NOLINTEND
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual void onReadyForBindings() /*override*/;
56
57 virtual void onSuspend() /*override*/;
58
59 virtual void onBindingsReleased() /*override*/;
60
61 virtual void update(double const time) /*override*/;
62
63 virtual ~CommandRegistry() /*override*/;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
70 ::std::string name,
71 ::std::function<::std::unique_ptr<::OreUI::Detail::ICommandGroup>()> constructor
72 );
73 // NOLINTEND
74
75public:
76 // destructor thunk
77 // NOLINTBEGIN
78 MCNAPI void $dtor();
79 // NOLINTEND
80
81public:
82 // virtual function thunks
83 // NOLINTBEGIN
84 MCNAPI void $onReadyForBindings();
85
86 MCNAPI void $onSuspend();
87
88 MCNAPI void $onBindingsReleased();
89
90 MCNAPI void $update(double const time);
91 // NOLINTEND
92};
93
94} // namespace OreUI::Detail
Definition Binder.h:7
Definition CommandRegistry.h:15
Definition CommandRegistry.h:7
MCAPI void registerCommandTemplate(::std::string name, ::std::function<::std::unique_ptr<::OreUI::Detail::ICommandGroup >()> constructor)
MCAPI void $update(double const time)
Definition ICommandGroup.h:7
Definition IInvocationStateTracker.h:7