LeviLamina
Loading...
Searching...
No Matches
Option.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/options/option_types/OptionID.h"
7#include "mc/options/option_types/OptionOwnerType.h"
8#include "mc/options/option_types/OptionResetFlags.h"
9#include "mc/options/option_types/OptionType.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace Bedrock::PubSub { class Subscription; }
14namespace Json { class Value; }
15// clang-format on
16
17class Option {
18public:
19 // Option inner types declare
20 // clang-format off
21 class Impl;
22 // clang-format on
23
24 // Option inner types define
25 class Impl {
26 public:
27 // member variables
28 // NOLINTBEGIN
44 // NOLINTEND
45
46 public:
47 // prevent constructor by default
48 Impl& operator=(Impl const&);
49 Impl(Impl const&);
50 Impl();
51
52 public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI Impl(
56 ::OptionID id,
57 ::OptionOwnerType ownerType,
58 ::OptionResetFlags resetFlags,
59 ::std::string const& captionId,
60 ::std::string const& saveTag,
61 ::OptionType optionType
62 );
63
64 MCAPI ~Impl();
65 // NOLINTEND
66
67 public:
68 // constructor thunks
69 // NOLINTBEGIN
70 MCAPI void* $ctor(
71 ::OptionID id,
72 ::OptionOwnerType ownerType,
73 ::OptionResetFlags resetFlags,
74 ::std::string const& captionId,
75 ::std::string const& saveTag,
76 ::OptionType optionType
77 );
78 // NOLINTEND
79
80 public:
81 // destructor thunk
82 // NOLINTBEGIN
83 MCAPI void $dtor();
84 // NOLINTEND
85 };
86
87public:
88 // member variables
89 // NOLINTBEGIN
91 // NOLINTEND
92
93public:
94 // prevent constructor by default
95 Option& operator=(Option const&);
96 Option(Option const&);
97 Option();
98
99public:
100 // virtual functions
101 // NOLINTBEGIN
102 // vIndex: 0
103 virtual ~Option() = default;
104
105 // vIndex: 1
106 virtual void save(::std::vector<::std::pair<::std::string, ::std::string>>&) = 0;
107
108 // vIndex: 4
109 virtual void load(::std::string const&) = 0;
110
111 // vIndex: 3
112 virtual void load(::std::map<::std::string, ::std::string>& propertyMap);
113
114 // vIndex: 2
115 virtual void load(::Json::Value const& valueJson);
116 // NOLINTEND
117
118public:
119 // member functions
120 // NOLINTBEGIN
121 MCAPI Option(
122 ::OptionID id,
123 ::OptionOwnerType ownerType,
124 ::OptionResetFlags resetFlags,
125 ::std::string const& captionId,
126 ::std::string const& saveTag,
127 ::OptionType optionType
128 );
129
130 MCAPI void _updatePropertyVector(
131 ::std::vector<::std::pair<::std::string, ::std::string>>& propertyVector,
132 ::std::string const& value
133 );
134
135 MCAPI bool getBool() const;
136
137 MCAPI ::Bedrock::PubSub::Subscription registerLock(::std::function<void(bool&)> isModifiableCondition);
138
139 MCAPI ::Bedrock::PubSub::Subscription registerObserver(::std::function<void(::Option const&)> onValueChangedCallback
140 );
141 // NOLINTEND
142
143public:
144 // static functions
145 // NOLINTBEGIN
146 MCAPI static bool read(::std::string const& valueString, bool& output);
147 // NOLINTEND
148
149public:
150 // constructor thunks
151 // NOLINTBEGIN
152 MCAPI void* $ctor(
153 ::OptionID id,
154 ::OptionOwnerType ownerType,
155 ::OptionResetFlags resetFlags,
156 ::std::string const& captionId,
157 ::std::string const& saveTag,
158 ::OptionType optionType
159 );
160 // NOLINTEND
161
162public:
163 // destructor thunk
164 // NOLINTBEGIN
165
166 // NOLINTEND
167
168public:
169 // virtual function thunks
170 // NOLINTBEGIN
171 MCAPI void $load(::std::map<::std::string, ::std::string>& propertyMap);
172
173 MCAPI void $load(::Json::Value const& valueJson);
174 // NOLINTEND
175
176public:
177 // vftables
178 // NOLINTBEGIN
179 MCAPI static void** $vftable();
180 // NOLINTEND
181};
Definition Value.h:16
Definition Option.h:25
Definition Option.h:17
Definition Alias.h:14