-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmouse.pb.cc
305 lines (264 loc) · 11 KB
/
mouse.pb.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mouse.proto
#include "mouse.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
namespace proto_messages {
class mouse_reportDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<mouse_report> _instance;
} _mouse_report_default_instance_;
} // namespace proto_messages
static void InitDefaultsscc_info_mouse_report_mouse_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::proto_messages::_mouse_report_default_instance_;
new (ptr) ::proto_messages::mouse_report();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::proto_messages::mouse_report::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_mouse_report_mouse_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_mouse_report_mouse_2eproto}, {}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_mouse_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_mouse_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_mouse_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_mouse_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::proto_messages::mouse_report, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::proto_messages::mouse_report, x_),
PROTOBUF_FIELD_OFFSET(::proto_messages::mouse_report, y_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::proto_messages::mouse_report)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::proto_messages::_mouse_report_default_instance_),
};
const char descriptor_table_protodef_mouse_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\013mouse.proto\022\016proto_messages\"$\n\014mouse_r"
"eport\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_mouse_2eproto_deps[1] = {
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mouse_2eproto_sccs[1] = {
&scc_info_mouse_report_mouse_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_mouse_2eproto_once;
static bool descriptor_table_mouse_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mouse_2eproto = {
&descriptor_table_mouse_2eproto_initialized, descriptor_table_protodef_mouse_2eproto, "mouse.proto", 75,
&descriptor_table_mouse_2eproto_once, descriptor_table_mouse_2eproto_sccs, descriptor_table_mouse_2eproto_deps, 1, 0,
schemas, file_default_instances, TableStruct_mouse_2eproto::offsets,
file_level_metadata_mouse_2eproto, 1, file_level_enum_descriptors_mouse_2eproto, file_level_service_descriptors_mouse_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_mouse_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_mouse_2eproto), true);
namespace proto_messages {
// ===================================================================
void mouse_report::InitAsDefaultInstance() {
}
class mouse_report::_Internal {
public:
};
mouse_report::mouse_report()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:proto_messages.mouse_report)
}
mouse_report::mouse_report(const mouse_report& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&x_, &from.x_,
static_cast<size_t>(reinterpret_cast<char*>(&y_) -
reinterpret_cast<char*>(&x_)) + sizeof(y_));
// @@protoc_insertion_point(copy_constructor:proto_messages.mouse_report)
}
void mouse_report::SharedCtor() {
::memset(&x_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&y_) -
reinterpret_cast<char*>(&x_)) + sizeof(y_));
}
mouse_report::~mouse_report() {
// @@protoc_insertion_point(destructor:proto_messages.mouse_report)
SharedDtor();
}
void mouse_report::SharedDtor() {
}
void mouse_report::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const mouse_report& mouse_report::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_mouse_report_mouse_2eproto.base);
return *internal_default_instance();
}
void mouse_report::Clear() {
// @@protoc_insertion_point(message_clear_start:proto_messages.mouse_report)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
::memset(&x_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&y_) -
reinterpret_cast<char*>(&x_)) + sizeof(y_));
_internal_metadata_.Clear();
}
const char* mouse_report::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// int32 x = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int32 y = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
::PROTOBUF_NAMESPACE_ID::uint8* mouse_report::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:proto_messages.mouse_report)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// int32 x = 1;
if (this->x() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_x(), target);
}
// int32 y = 2;
if (this->y() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_y(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:proto_messages.mouse_report)
return target;
}
size_t mouse_report::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:proto_messages.mouse_report)
size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// int32 x = 1;
if (this->x() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_x());
}
// int32 y = 2;
if (this->y() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_y());
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void mouse_report::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:proto_messages.mouse_report)
GOOGLE_DCHECK_NE(&from, this);
const mouse_report* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<mouse_report>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:proto_messages.mouse_report)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:proto_messages.mouse_report)
MergeFrom(*source);
}
}
void mouse_report::MergeFrom(const mouse_report& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:proto_messages.mouse_report)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.x() != 0) {
_internal_set_x(from._internal_x());
}
if (from.y() != 0) {
_internal_set_y(from._internal_y());
}
}
void mouse_report::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:proto_messages.mouse_report)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void mouse_report::CopyFrom(const mouse_report& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:proto_messages.mouse_report)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool mouse_report::IsInitialized() const {
return true;
}
void mouse_report::InternalSwap(mouse_report* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(x_, other->x_);
swap(y_, other->y_);
}
::PROTOBUF_NAMESPACE_ID::Metadata mouse_report::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
} // namespace proto_messages
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::proto_messages::mouse_report* Arena::CreateMaybeMessage< ::proto_messages::mouse_report >(Arena* arena) {
return Arena::CreateInternal< ::proto_messages::mouse_report >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>