LeviLamina
Loading...
Searching...
No Matches
EditorFeatureFlagServiceProvider.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/FeatureFlagCategory.h"
7#include "mc/common/editor/FeatureFlagSource.h"
8#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Bedrock::PubSub { class Subscription; }
13namespace Editor { struct FeatureFlagEntry; }
14// clang-format on
15
16namespace Editor::Services {
17
19public:
20 // virtual functions
21 // NOLINTBEGIN
22 virtual ~EditorFeatureFlagServiceProvider() = default;
23
24 virtual ::std::optional<bool> getFlag(::std::string const& name) const = 0;
25
26 virtual ::Scripting::Result_deprecated<void> setFlag(::std::string const& name, bool value) = 0;
27
28 virtual ::Scripting::Result_deprecated<void> registerFlag(
29 ::std::string const& name,
30 bool defaultValue,
31 ::Editor::FeatureFlagCategory category,
32 ::Editor::FeatureFlagSource source,
33 ::std::string const& description,
34 bool readOnly
35 ) = 0;
36
37 virtual bool hasFlag(::std::string const& name) const = 0;
38
39 virtual ::std::unordered_map<::std::string, ::Editor::FeatureFlagEntry> const& getAllFlags() const = 0;
40
41 virtual bool isHost() const = 0;
42
43 virtual ::Bedrock::PubSub::Subscription
44 listenForFlagChanged(::std::function<void(::std::string const&, bool, ::Editor::FeatureFlagCategory)> func) = 0;
45 // NOLINTEND
46};
47
48} // namespace Editor::Services
Definition Subscription.h:10
Definition EditorFeatureFlagServiceProvider.h:18
Definition FeatureFlagEntry.h:7