LeviLamina
Loading...
Searching...
No Matches
TextPacketPayload.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/network/packet/TextPacketType.h"
7
8// auto generated forward declare list
9// clang-format off
11class TextPacket;
12// clang-format on
13
14struct TextPacketPayload {
15public:
16 // TextPacketPayload inner types declare
17 // clang-format off
18 struct AuthorAndMessage;
19 struct MessageAndParams;
20 struct MessageOnly;
21 // clang-format on
22
23 // TextPacketPayload inner types define
24 struct AuthorAndMessage {
25 public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
29 ::ll::TypedStorage<8, 32, ::std::string> mAuthor;
30 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
31 // NOLINTEND
32
33 public:
34 AuthorAndMessage(AuthorAndMessage const&) = default;
35 AuthorAndMessage() = default;
36 AuthorAndMessage(TextPacketType type, std::string const& author, std::string const& message)
37 : mType(type),
38 mAuthor(author),
39 mMessage(message) {}
40
41 public:
42 // member functions
43 // NOLINTBEGIN
44 MCAPI ::TextPacketPayload::AuthorAndMessage& operator=(::TextPacketPayload::AuthorAndMessage&&);
45
46 MCAPI ::TextPacketPayload::AuthorAndMessage& operator=(::TextPacketPayload::AuthorAndMessage const&);
47
48 MCAPI bool operator==(::TextPacketPayload::AuthorAndMessage const& other) const;
49
50 MCAPI ~AuthorAndMessage();
51 // NOLINTEND
52
53 public:
54 // destructor thunk
55 // NOLINTBEGIN
56 MCFOLD void $dtor();
57 // NOLINTEND
58 };
59
60 struct MessageAndParams {
61 public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
65 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
66 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mParams;
67 // NOLINTEND
68
69 public:
70 MessageAndParams(MessageAndParams const&) = default;
71 MessageAndParams() = default;
72 MessageAndParams(TextPacketType type, std::string const& message, std::vector<std::string> const& params)
73 : mType(type),
74 mMessage(message),
75 mParams(params) {}
76
77 public:
78 // member functions
79 // NOLINTBEGIN
80 MCFOLD ::TextPacketPayload::MessageAndParams& operator=(::TextPacketPayload::MessageAndParams&&);
81
82 MCFOLD ::TextPacketPayload::MessageAndParams& operator=(::TextPacketPayload::MessageAndParams const&);
83
84 MCAPI bool operator==(::TextPacketPayload::MessageAndParams const& other) const;
85
86 MCAPI ~MessageAndParams();
87 // NOLINTEND
88
89 public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCFOLD void $dtor();
93 // NOLINTEND
94 };
95
96 struct MessageOnly {
97 public:
98 // member variables
99 // NOLINTBEGIN
100 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
101 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
102 // NOLINTEND
103
104 public:
105 MessageOnly(MessageOnly const&) = default;
106 MessageOnly() = default;
107 MessageOnly(TextPacketType type, std::string const& message) : mType(type), mMessage(message) {}
108
109 public:
110 // member functions
111 // NOLINTBEGIN
112 MCFOLD ::TextPacketPayload::MessageOnly& operator=(::TextPacketPayload::MessageOnly&&);
113
114 MCFOLD ::TextPacketPayload::MessageOnly& operator=(::TextPacketPayload::MessageOnly const&);
115
116 MCAPI ~MessageOnly();
117 // NOLINTEND
118
119 public:
120 // destructor thunk
121 // NOLINTBEGIN
122 MCFOLD void $dtor();
123 // NOLINTEND
124 };
125
126public:
127 // member variables
128 // NOLINTBEGIN
129 ::ll::TypedStorage<1, 1, bool> mLocalize;
130 ::ll::TypedStorage<8, 32, ::std::string> mXuid;
131 ::ll::TypedStorage<8, 32, ::std::string> mPlatformId;
132 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFilteredMessage;
133 ::ll::TypedStorage<
134 8,
135 80,
136 ::std::variant<
140 mBody;
141 // NOLINTEND
142
143public:
144 // prevent constructor by default
145 TextPacketPayload();
146
147public:
148 // member functions
149 // NOLINTBEGIN
150 MCAPI TextPacketPayload(::TextPacketPayload&&);
151
152 MCAPI TextPacketPayload(::TextPacketPayload const&);
153
154 MCAPI_C ::std::string const& getAuthorOrEmpty() const;
155
156 MCAPI ::std::string const& getMessage() const;
157
158 MCAPI ::TextPacketPayload& operator=(::TextPacketPayload&&);
159
160 MCAPI ::TextPacketPayload& operator=(::TextPacketPayload const&);
161
162 MCAPI ~TextPacketPayload();
163 // NOLINTEND
164
165public:
166 // static functions
167 // NOLINTBEGIN
168 MCAPI static ::TextPacket createAnnouncement(
169 ::std::string const& author,
170 ::std::string const& message,
171 ::std::optional<::std::string> filteredMessage,
172 ::std::string const& xuid,
173 ::std::string const& platformId
174 );
175
176 MCAPI static ::TextPacket createChat(
177 ::std::string const& author,
178 ::std::string const& message,
179 ::std::optional<::std::string> filteredMessage,
180 ::std::string const& xuid,
181 ::std::string const& platformId
182 );
183
184 MCAPI static ::TextPacket createTextObjectMessage(
185 ::ResolvedTextObject const& resolvedTextObject,
186 ::std::string fromXuid,
187 ::std::string fromPlatformId
188 );
189
190 MCAPI static ::TextPacket
191 createTranslated(::std::string const& message, ::std::vector<::std::string> const& params);
192 // NOLINTEND
193
194public:
195 // constructor thunks
196 // NOLINTBEGIN
197 MCAPI void* $ctor(::TextPacketPayload&&);
198
199 MCAPI void* $ctor(::TextPacketPayload const&);
200 // NOLINTEND
201
202public:
203 // destructor thunk
204 // NOLINTBEGIN
205 MCAPI void $dtor();
206 // NOLINTEND
207};
Definition ResolvedTextObject.h:5
Definition TextPacket.h:19
Definition TextPacketPayload.h:24
Definition TextPacketPayload.h:60
Definition TextPacketPayload.h:96