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 MCNAPI 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 MCNAPI ~Impl();
65 // NOLINTEND
66
67 public:
68 // constructor thunks
69 // NOLINTBEGIN
70 MCNAPI 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 MCNAPI 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 MCNAPI 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
131 ::std::vector<::std::pair<::std::string, ::std::string>>& propertyVector,
132 ::std::string const& value
133 );
134
135 MCNAPI bool getBool() const;
136
137 MCNAPI ::Bedrock::PubSub::Subscription registerLock(::std::function<void(bool&)> isModifiableCondition);
138
139 MCNAPI ::Bedrock::PubSub::Subscription
140 registerObserver(::std::function<void(::Option const&)> onValueChangedCallback);
141 // NOLINTEND
142
143public:
144 // static functions
145 // NOLINTBEGIN
146 MCNAPI static bool read(::std::string const& valueString, bool& output);
147 // NOLINTEND
148
149public:
150 // constructor thunks
151 // NOLINTBEGIN
152 MCNAPI 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 // virtual function thunks
164 // NOLINTBEGIN
165 MCNAPI void $load(::std::map<::std::string, ::std::string>& propertyMap);
166
167 MCNAPI void $load(::Json::Value const& valueJson);
168 // NOLINTEND
169
170public:
171 // vftables
172 // NOLINTBEGIN
173 MCNAPI static void** $vftable();
174 // NOLINTEND
175};
Definition Value.h:16
Definition Option.h:25
MCAPI Impl(::OptionID id, ::OptionOwnerType ownerType, ::OptionResetFlags resetFlags, ::std::string const &captionId, ::std::string const &saveTag, ::OptionType optionType)
MCAPI void $dtor()
MCAPI ~Impl()
MCAPI void * $ctor(::OptionID id, ::OptionOwnerType ownerType, ::OptionResetFlags resetFlags, ::std::string const &captionId, ::std::string const &saveTag, ::OptionType optionType)
Definition Option.h:17
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)
MCAPI Option(::OptionID id, ::OptionOwnerType ownerType, ::OptionResetFlags resetFlags, ::std::string const &captionId, ::std::string const &saveTag, ::OptionType optionType)
MCAPI void $load(::Json::Value const &valueJson)
Definition Alias.h:14