Skip to content
LeviMC
English
AutoLightDark
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::FacetPrototype>> mFacetPrototypes;
53 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::FacetRegistry::FacetEntry>> mFacets;
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 suspendAllFacets() /*override*/;
78
79 virtual void disableFacetActivation() /*override*/;
80
81 virtual void bind(::OreUI::FacetBinder& binder) /*override*/;
82
83 virtual ::std::vector<::std::string> const& update(::OreUI::FacetBinder& binder) /*override*/;
84
85 virtual ::std::unordered_map<::std::string, ::Bedrock::NotNullNonOwnerPtr<::OreUI::IFacet>>
86 getActiveFacets() /*override*/;
87 // NOLINTEND
88
89public:
90 // virtual function thunks
91 // NOLINTBEGIN
92 MCAPI void
93 $registerFacet(::std::string const& name, ::std::function<::std::unique_ptr<::OreUI::IFacet>()> const& constructor);
94
95 MCAPI ::std::optional<::OreUI::IFacetRegistry::Error> $activateFacet(
96 ::OreUI::FacetBinder& binder,
97 ::std::string const& name,
98 ::std::string const& id,
99 ::std::unordered_map<::std::string, ::std::variant<double, bool, ::std::string>> const& payload
100 );
101
102 MCNAPI ::std::optional<::OreUI::IFacetRegistry::Error>
103 $deactivateFacet(::OreUI::FacetBinder& binder, ::std::string const& id);
104
105 MCNAPI void $suspendAllFacets();
106
108
109 MCNAPI void $bind(::OreUI::FacetBinder& binder);
110
111 MCNAPI ::std::vector<::std::string> const& $update(::OreUI::FacetBinder& binder);
112
113 MCNAPI ::std::unordered_map<::std::string, ::Bedrock::NotNullNonOwnerPtr<::OreUI::IFacet>> $getActiveFacets();
114 // NOLINTEND
115};
116
117} // namespace OreUI
Definition FacetBinder.h:7
Definition FacetRegistry.h:7
MCAPI void $disableFacetActivation()
MCAPI void $bind(::OreUI::FacetBinder &binder)
MCAPI void $suspendAllFacets()
MCAPI ::std::optional<::OreUI::IFacetRegistry::Error > $deactivateFacet(::OreUI::FacetBinder &binder, ::std::string const &id)
MCAPI ::std::unordered_map<::std::string, ::Bedrock::NotNullNonOwnerPtr<::OreUI::IFacet > > $getActiveFacets()
MCAPI ::std::vector<::std::string > const & $update(::OreUI::FacetBinder &binder)
Definition IFacet.h:7
Definition FacetRegistry.h:18
Definition FacetRegistry.h:16