LeviLamina
Loading...
Searching...
No Matches
EditorFeatureFlagService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/EditorFeatureFlagServiceProvider.h"
7#include "mc/common/editor/FeatureFlagCategory.h"
8#include "mc/common/editor/FeatureFlagSource.h"
9#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
10#include "mc/editor/services/IEditorService.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace Bedrock::PubSub { class Subscription; }
15namespace Editor { class ServiceProviderCollection; }
16namespace Editor { struct FeatureFlagEntry; }
17namespace Editor::Network { class FeatureFlagBulkSyncPayload; }
18namespace Editor::Network { class FeatureFlagChangedPayload; }
19// clang-format on
20
21namespace Editor::Services {
22
23class EditorFeatureFlagService : public ::Editor::Services::IEditorService,
25public:
26 // member variables
27 // NOLINTBEGIN
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 EditorFeatureFlagService& operator=(EditorFeatureFlagService const&);
37 EditorFeatureFlagService(EditorFeatureFlagService const&);
38 EditorFeatureFlagService();
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 virtual ~EditorFeatureFlagService() /*override*/;
44
45 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
46
47 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
48
49 virtual ::std::optional<bool> getFlag(::std::string const& name) const /*override*/;
50
51 virtual ::Scripting::Result_deprecated<void> setFlag(::std::string const& name, bool value) /*override*/;
52
53 virtual ::Scripting::Result_deprecated<void> registerFlag(
54 ::std::string const& name,
55 bool defaultValue,
56 ::Editor::FeatureFlagCategory category,
57 ::Editor::FeatureFlagSource source,
58 ::std::string const& description,
59 bool readOnly
60 ) /*override*/;
61
62 virtual bool hasFlag(::std::string const& name) const /*override*/;
63
64 virtual ::std::unordered_map<::std::string, ::Editor::FeatureFlagEntry> const& getAllFlags() const /*override*/;
65
66 virtual ::Bedrock::PubSub::Subscription listenForFlagChanged(
67 ::std::function<void(::std::string const&, bool, ::Editor::FeatureFlagCategory)> func
68 ) /*override*/;
69
70#ifdef LL_PLAT_S
71 virtual void _handleFeatureFlagChangedPayload(::Editor::Network::FeatureFlagChangedPayload const&);
72#else // LL_PLAT_C
73 virtual void _handleFeatureFlagChangedPayload(::Editor::Network::FeatureFlagChangedPayload const& payload);
74#endif
75
76 virtual void _handleFeatureFlagBulkSyncPayload(::Editor::Network::FeatureFlagBulkSyncPayload const& payload);
77 // NOLINTEND
78
79public:
80 // member functions
81 // NOLINTBEGIN
83 // NOLINTEND
84
85public:
86 // constructor thunks
87 // NOLINTBEGIN
89 // NOLINTEND
90
91public:
92 // destructor thunk
93 // NOLINTBEGIN
94 MCNAPI void $dtor();
95 // NOLINTEND
96
97public:
98 // virtual function thunks
99 // NOLINTBEGIN
100 MCNAPI ::Scripting::Result_deprecated<void> $init();
101
102 MCNAPI ::Scripting::Result_deprecated<void> $quit();
103
104 MCNAPI ::std::optional<bool> $getFlag(::std::string const& name) const;
105
106 MCNAPI ::Scripting::Result_deprecated<void> $setFlag(::std::string const& name, bool value);
107
108 MCNAPI ::Scripting::Result_deprecated<void> $registerFlag(
109 ::std::string const& name,
110 bool defaultValue,
111 ::Editor::FeatureFlagCategory category,
112 ::Editor::FeatureFlagSource source,
113 ::std::string const& description,
114 bool readOnly
115 );
116
117 MCNAPI bool $hasFlag(::std::string const& name) const;
118
119 MCNAPI ::std::unordered_map<::std::string, ::Editor::FeatureFlagEntry> const& $getAllFlags() const;
120
121 MCNAPI ::Bedrock::PubSub::Subscription
122 $listenForFlagChanged(::std::function<void(::std::string const&, bool, ::Editor::FeatureFlagCategory)> func);
123
124#ifdef LL_PLAT_S
126#else // LL_PLAT_C
128#endif
129
131
132
133 // NOLINTEND
134
135public:
136 // vftables
137 // NOLINTBEGIN
139
140 MCNAPI static void** $vftableForIEditorService();
141 // NOLINTEND
142};
143
144} // namespace Editor::Services
Definition Subscription.h:10
Definition FeatureFlagBulkSyncPayload.h:16
Definition FeatureFlagChangedPayload.h:17
Definition ServiceProviderCollection.h:7
Definition EditorFeatureFlagServiceProvider.h:18
MCAPI ::Scripting::Result_deprecated< void > $setFlag(::std::string const &name, bool value)
MCAPI ::Scripting::Result_deprecated< void > $quit()
MCAPI::Bedrock::PubSub::Subscription $listenForFlagChanged(::std::function< void(::std::string const &, bool, ::Editor::FeatureFlagCategory)> func)
MCAPI void $_handleFeatureFlagChangedPayload(::Editor::Network::FeatureFlagChangedPayload const &payload)
MCAPI ::Scripting::Result_deprecated< void > $registerFlag(::std::string const &name, bool defaultValue, ::Editor::FeatureFlagCategory category, ::Editor::FeatureFlagSource source, ::std::string const &description, bool readOnly)
static MCAPI void ** $vftableForIEditorService()
static MCAPI void ** $vftableForEditorFeatureFlagServiceProvider()
MCAPI ::Scripting::Result_deprecated< void > $init()
MCAPI ::std::optional< bool > $getFlag(::std::string const &name) const
MCAPI bool $hasFlag(::std::string const &name) const
MCAPI EditorFeatureFlagService(::Editor::ServiceProviderCollection &providers)
MCAPI ::std::unordered_map<::std::string, ::Editor::FeatureFlagEntry > const & $getAllFlags() const
MCAPI void * $ctor(::Editor::ServiceProviderCollection &providers)
MCAPI void $_handleFeatureFlagBulkSyncPayload(::Editor::Network::FeatureFlagBulkSyncPayload const &payload)
Definition IEditorService.h:11
Definition FeatureFlagEntry.h:7
Definition Alias.h:14