LeviLamina
Loading...
Searching...
No Matches
StringComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/settings/Component.h"
7#include "mc/client/settings/ComponentState.h"
8
9// auto generated forward declare list
10// clang-format off
11namespace Settings { class IStringDataProvider; }
12// clang-format on
13
14namespace Settings {
15
16class StringComponent : public ::Settings::Component<::Settings::StringComponent> {
17public:
18 // StringComponent inner types define
19 using DataProvider = ::Settings::IStringDataProvider;
20
21 using FormatValidationCallback = ::std::function<::std::optional<::std::string>(::std::string)>;
22
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Settings::IStringDataProvider>> mDataProvider;
27 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mPlaceholder;
28 ::ll::TypedStorage<4, 8, ::std::optional<int>> mMaxLength;
29 ::ll::TypedStorage<8, 72, ::std::optional<::std::function<::std::optional<::std::string>(::std::string)>>>
30 mFormatValidation;
31 ::ll::TypedStorage<1, 1, bool> mIsFormatValid;
32 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFallbackValue;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 StringComponent();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~StringComponent() /*override*/;
43
44 virtual ::Settings::ComponentState getDefaultState() const /*override*/;
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI StringComponent(
51 ::std::string_view id,
52 ::std::string_view name,
53 ::std::optional<::std::string> description,
54 ::std::unique_ptr<::Settings::IStringDataProvider> dataProvider,
55 ::std::optional<::std::string> placeholder,
56 ::std::optional<int> maxLength
57 );
58
59 MCAPI ::std::optional<::std::string> getPlaceholder() const;
60
61 MCAPI bool updateValue(::std::string const& value);
62 // NOLINTEND
63
64public:
65 // constructor thunks
66 // NOLINTBEGIN
67 MCAPI void* $ctor(
68 ::std::string_view id,
69 ::std::string_view name,
70 ::std::optional<::std::string> description,
71 ::std::unique_ptr<::Settings::IStringDataProvider> dataProvider,
72 ::std::optional<::std::string> placeholder,
73 ::std::optional<int> maxLength
74 );
75 // NOLINTEND
76
77public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCAPI void $dtor();
81 // NOLINTEND
82
83public:
84 // virtual function thunks
85 // NOLINTBEGIN
86 MCFOLD ::Settings::ComponentState $getDefaultState() const;
87 // NOLINTEND
88
89public:
90 // vftables
91 // NOLINTBEGIN
92 MCNAPI static void** $vftable();
93 // NOLINTEND
94};
95
96} // namespace Settings
Definition IStringDataProvider.h:7
Definition StringComponent.h:7
static MCAPI void ** $vftable()