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 void commitValue();
60
61 MCAPI bool flush();
62
63 MCAPI ::std::optional<::std::string> getFallbackValue() const;
64
65 MCAPI ::std::optional<int> getMaxLength() const;
66
67 MCAPI ::std::optional<::std::string> getPlaceholder() const;
68
69 MCFOLD ::std::string getValue() const;
70
71 MCAPI bool isFormatValid() const;
72
73 MCAPI bool updateValue(::std::string const& value);
74 // NOLINTEND
75
76public:
77 // constructor thunks
78 // NOLINTBEGIN
79 MCAPI void* $ctor(
80 ::std::string_view id,
81 ::std::string_view name,
82 ::std::optional<::std::string> description,
83 ::std::unique_ptr<::Settings::IStringDataProvider> dataProvider,
84 ::std::optional<::std::string> placeholder,
85 ::std::optional<int> maxLength
86 );
87 // NOLINTEND
88
89public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCAPI void $dtor();
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCFOLD ::Settings::ComponentState $getDefaultState() const;
99 // NOLINTEND
100
101public:
102 // vftables
103 // NOLINTBEGIN
104 MCNAPI static void** $vftable();
105 // NOLINTEND
106};
107
108} // namespace Settings
Definition IStringDataProvider.h:7
Definition StringComponent.h:7
static MCAPI void ** $vftable()