LeviLamina
Loading...
Searching...
No Matches
FacetRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/interface/FacetRegistryLocation.h"
7#include "mc/client/gui/oreui/interface/IFacetRegistry.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace OreUI { class FacetBinder; }
13namespace OreUI { class IFacet; }
14// clang-format on
15
16namespace OreUI {
17
18class FacetRegistry : public ::OreUI::IFacetRegistry {
19public:
20 // FacetRegistry inner types declare
21 // clang-format off
22 struct FacetPrototype;
23 struct FacetEntry;
24 // clang-format on
25
26 // FacetRegistry inner types define
27 struct FacetPrototype {
28 public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 32, ::std::string const> name;
32 ::ll::TypedStorage<8, 64, ::std::function<::std::unique_ptr<::OreUI::IFacet>()> const> constructor;
33 // NOLINTEND
34 };
35
36 struct FacetEntry {
37 public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 32, ::std::string> name;
41 ::ll::TypedStorage<8, 32, ::std::string> id;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::IFacet>> facet;
43 ::ll::TypedStorage<1, 1, bool> isSuspended;
44 // NOLINTEND
45 };
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<4, 4, ::OreUI::FacetRegistryLocation> mLocation;
51 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mUpdatingFacets;
52 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::FacetRegistry::FacetEntry>> mFacets;
53 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::FacetRegistry::FacetPrototype>> mFacetPrototypes;
54 ::ll::TypedStorage<1, 1, bool> mIsActivationDisabled;
55 // NOLINTEND
56
57public:
58 // virtual functions
59 // NOLINTBEGIN
60 virtual ~FacetRegistry() /*override*/ = default;
61
62 virtual void registerFacet(
63 ::std::string const& name,
64 ::std::function<::std::unique_ptr<::OreUI::IFacet>()> const& constructor
65 ) /*override*/;
66
67 virtual ::std::optional<::OreUI::IFacetRegistry::Error> activateFacet(
68 ::OreUI::FacetBinder& binder,
69 ::std::string const& name,
70 ::std::string const& id,
71 ::std::unordered_map<::std::string, ::std::variant<double, bool, ::std::string>> const& payload
72 ) /*override*/;
73
74 virtual ::std::optional<::OreUI::IFacetRegistry::Error>
75 deactivateFacet(::OreUI::FacetBinder& binder, ::std::string const& id) /*override*/;
76
77 virtual void clearAllFacets() /*override*/;
78
79 virtual void suspendAllFacets() /*override*/;
80
81 virtual void disableFacetActivation() /*override*/;
82
83 virtual void bind(::OreUI::FacetBinder& binder) /*override*/;
84
85 virtual ::std::vector<::std::string> const& update(::OreUI::FacetBinder& binder) /*override*/;
86
87 virtual ::std::unordered_map<::std::string, ::Bedrock::NotNullNonOwnerPtr<::OreUI::IFacet>>
88 getActiveFacets() /*override*/;
89 // NOLINTEND
90
91public:
92 // virtual function thunks
93 // NOLINTBEGIN
94 MCAPI void
95 $registerFacet(::std::string const& name, ::std::function<::std::unique_ptr<::OreUI::IFacet>()> const& constructor);
96
97 MCAPI ::std::optional<::OreUI::IFacetRegistry::Error> $activateFacet(
98 ::OreUI::FacetBinder& binder,
99 ::std::string const& name,
100 ::std::string const& id,
101 ::std::unordered_map<::std::string, ::std::variant<double, bool, ::std::string>> const& payload
102 );
103
104 MCAPI ::std::optional<::OreUI::IFacetRegistry::Error>
105 $deactivateFacet(::OreUI::FacetBinder& binder, ::std::string const& id);
106
107 MCAPI void $clearAllFacets();
108
109 MCAPI void $suspendAllFacets();
110
111 MCAPI void $disableFacetActivation();
112
113 MCAPI void $bind(::OreUI::FacetBinder& binder);
114
115 MCAPI ::std::vector<::std::string> const& $update(::OreUI::FacetBinder& binder);
116
117 MCAPI ::std::unordered_map<::std::string, ::Bedrock::NotNullNonOwnerPtr<::OreUI::IFacet>> $getActiveFacets();
118 // NOLINTEND
119};
120
121} // namespace OreUI
Definition FacetBinder.h:7
Definition FacetRegistry.h:7
Definition IFacet.h:7
Definition FacetRegistry.h:18
Definition FacetRegistry.h:16