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