/src/brpc/build/brpc/trackme.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: brpc/trackme.proto |
3 | | |
4 | | #include "brpc/trackme.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/stubs/common.h> |
9 | | #include <google/protobuf/stubs/port.h> |
10 | | #include <google/protobuf/io/coded_stream.h> |
11 | | #include <google/protobuf/wire_format_lite_inl.h> |
12 | | #include <google/protobuf/descriptor.h> |
13 | | #include <google/protobuf/generated_message_reflection.h> |
14 | | #include <google/protobuf/reflection_ops.h> |
15 | | #include <google/protobuf/wire_format.h> |
16 | | // This is a temporary google only hack |
17 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
18 | | #include "third_party/protobuf/version.h" |
19 | | #endif |
20 | | // @@protoc_insertion_point(includes) |
21 | | |
22 | | namespace brpc { |
23 | | class TrackMeRequestDefaultTypeInternal { |
24 | | public: |
25 | | ::google::protobuf::internal::ExplicitlyConstructed<TrackMeRequest> |
26 | | _instance; |
27 | | } _TrackMeRequest_default_instance_; |
28 | | class TrackMeResponseDefaultTypeInternal { |
29 | | public: |
30 | | ::google::protobuf::internal::ExplicitlyConstructed<TrackMeResponse> |
31 | | _instance; |
32 | | } _TrackMeResponse_default_instance_; |
33 | | } // namespace brpc |
34 | | namespace protobuf_brpc_2ftrackme_2eproto { |
35 | 2 | static void InitDefaultsTrackMeRequest() { |
36 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
37 | | |
38 | 2 | { |
39 | 2 | void* ptr = &::brpc::_TrackMeRequest_default_instance_; |
40 | 2 | new (ptr) ::brpc::TrackMeRequest(); |
41 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
42 | 2 | } |
43 | 2 | ::brpc::TrackMeRequest::InitAsDefaultInstance(); |
44 | 2 | } |
45 | | |
46 | | ::google::protobuf::internal::SCCInfo<0> scc_info_TrackMeRequest = |
47 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTrackMeRequest}, {}}; |
48 | | |
49 | 2 | static void InitDefaultsTrackMeResponse() { |
50 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
51 | | |
52 | 2 | { |
53 | 2 | void* ptr = &::brpc::_TrackMeResponse_default_instance_; |
54 | 2 | new (ptr) ::brpc::TrackMeResponse(); |
55 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
56 | 2 | } |
57 | 2 | ::brpc::TrackMeResponse::InitAsDefaultInstance(); |
58 | 2 | } |
59 | | |
60 | | ::google::protobuf::internal::SCCInfo<0> scc_info_TrackMeResponse = |
61 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTrackMeResponse}, {}}; |
62 | | |
63 | 2 | void InitDefaults() { |
64 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_TrackMeRequest.base); |
65 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_TrackMeResponse.base); |
66 | 2 | } |
67 | | |
68 | | ::google::protobuf::Metadata file_level_metadata[2]; |
69 | | const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; |
70 | | const ::google::protobuf::ServiceDescriptor* file_level_service_descriptors[1]; |
71 | | |
72 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
73 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeRequest, _has_bits_), |
74 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeRequest, _internal_metadata_), |
75 | | ~0u, // no _extensions_ |
76 | | ~0u, // no _oneof_case_ |
77 | | ~0u, // no _weak_field_map_ |
78 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeRequest, rpc_version_), |
79 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeRequest, server_addr_), |
80 | | 1, |
81 | | 0, |
82 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeResponse, _has_bits_), |
83 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeResponse, _internal_metadata_), |
84 | | ~0u, // no _extensions_ |
85 | | ~0u, // no _oneof_case_ |
86 | | ~0u, // no _weak_field_map_ |
87 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeResponse, severity_), |
88 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeResponse, error_text_), |
89 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::TrackMeResponse, new_interval_), |
90 | | 1, |
91 | | 0, |
92 | | 2, |
93 | | }; |
94 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
95 | | { 0, 7, sizeof(::brpc::TrackMeRequest)}, |
96 | | { 9, 17, sizeof(::brpc::TrackMeResponse)}, |
97 | | }; |
98 | | |
99 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
100 | | reinterpret_cast<const ::google::protobuf::Message*>(&::brpc::_TrackMeRequest_default_instance_), |
101 | | reinterpret_cast<const ::google::protobuf::Message*>(&::brpc::_TrackMeResponse_default_instance_), |
102 | | }; |
103 | | |
104 | 0 | void protobuf_AssignDescriptors() { |
105 | 0 | AddDescriptors(); |
106 | 0 | AssignDescriptors( |
107 | 0 | "brpc/trackme.proto", schemas, file_default_instances, TableStruct::offsets, |
108 | 0 | file_level_metadata, file_level_enum_descriptors, file_level_service_descriptors); |
109 | 0 | } |
110 | | |
111 | 0 | void protobuf_AssignDescriptorsOnce() { |
112 | 0 | static ::google::protobuf::internal::once_flag once; |
113 | 0 | ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); |
114 | 0 | } |
115 | | |
116 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
117 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
118 | 0 | protobuf_AssignDescriptorsOnce(); |
119 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); |
120 | 0 | } |
121 | | |
122 | 2 | void AddDescriptorsImpl() { |
123 | 2 | InitDefaults(); |
124 | 2 | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
125 | 2 | "\n\022brpc/trackme.proto\022\004brpc\":\n\016TrackMeReq" |
126 | 2 | "uest\022\023\n\013rpc_version\030\001 \001(\003\022\023\n\013server_addr" |
127 | 2 | "\030\002 \001(\t\"d\n\017TrackMeResponse\022\'\n\010severity\030\001 " |
128 | 2 | "\001(\0162\025.brpc.TrackMeSeverity\022\022\n\nerror_text" |
129 | 2 | "\030\002 \001(\t\022\024\n\014new_interval\030\003 \001(\005*F\n\017TrackMeS" |
130 | 2 | "everity\022\r\n\tTrackMeOK\020\000\022\022\n\016TrackMeWarning" |
131 | 2 | "\020\001\022\020\n\014TrackMeFatal\020\0022H\n\016TrackMeService\0226" |
132 | 2 | "\n\007TrackMe\022\024.brpc.TrackMeRequest\032\025.brpc.T" |
133 | 2 | "rackMeResponseB\003\200\001\001" |
134 | 2 | }; |
135 | 2 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
136 | 2 | descriptor, 339); |
137 | 2 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
138 | 2 | "brpc/trackme.proto", &protobuf_RegisterTypes); |
139 | 2 | } |
140 | | |
141 | 2 | void AddDescriptors() { |
142 | 2 | static ::google::protobuf::internal::once_flag once; |
143 | 2 | ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); |
144 | 2 | } |
145 | | // Force AddDescriptors() to be called at dynamic initialization time. |
146 | | struct StaticDescriptorInitializer { |
147 | 2 | StaticDescriptorInitializer() { |
148 | 2 | AddDescriptors(); |
149 | 2 | } |
150 | | } static_descriptor_initializer; |
151 | | } // namespace protobuf_brpc_2ftrackme_2eproto |
152 | | namespace brpc { |
153 | 0 | const ::google::protobuf::EnumDescriptor* TrackMeSeverity_descriptor() { |
154 | 0 | protobuf_brpc_2ftrackme_2eproto::protobuf_AssignDescriptorsOnce(); |
155 | 0 | return protobuf_brpc_2ftrackme_2eproto::file_level_enum_descriptors[0]; |
156 | 0 | } |
157 | 0 | bool TrackMeSeverity_IsValid(int value) { |
158 | 0 | switch (value) { |
159 | 0 | case 0: |
160 | 0 | case 1: |
161 | 0 | case 2: |
162 | 0 | return true; |
163 | 0 | default: |
164 | 0 | return false; |
165 | 0 | } |
166 | 0 | } |
167 | | |
168 | | |
169 | | // =================================================================== |
170 | | |
171 | 2 | void TrackMeRequest::InitAsDefaultInstance() { |
172 | 2 | } |
173 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
174 | | const int TrackMeRequest::kRpcVersionFieldNumber; |
175 | | const int TrackMeRequest::kServerAddrFieldNumber; |
176 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
177 | | |
178 | | TrackMeRequest::TrackMeRequest() |
179 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
180 | 2 | ::google::protobuf::internal::InitSCC( |
181 | 2 | &protobuf_brpc_2ftrackme_2eproto::scc_info_TrackMeRequest.base); |
182 | 2 | SharedCtor(); |
183 | | // @@protoc_insertion_point(constructor:brpc.TrackMeRequest) |
184 | 2 | } |
185 | | TrackMeRequest::TrackMeRequest(const TrackMeRequest& from) |
186 | 0 | : ::google::protobuf::Message(), |
187 | 0 | _internal_metadata_(NULL), |
188 | 0 | _has_bits_(from._has_bits_) { |
189 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
190 | 0 | server_addr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
191 | 0 | if (from.has_server_addr()) { |
192 | 0 | server_addr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.server_addr_); |
193 | 0 | } |
194 | 0 | rpc_version_ = from.rpc_version_; |
195 | | // @@protoc_insertion_point(copy_constructor:brpc.TrackMeRequest) |
196 | 0 | } |
197 | | |
198 | 2 | void TrackMeRequest::SharedCtor() { |
199 | 2 | server_addr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
200 | 2 | rpc_version_ = GOOGLE_LONGLONG(0); |
201 | 2 | } |
202 | | |
203 | 0 | TrackMeRequest::~TrackMeRequest() { |
204 | | // @@protoc_insertion_point(destructor:brpc.TrackMeRequest) |
205 | 0 | SharedDtor(); |
206 | 0 | } |
207 | | |
208 | 0 | void TrackMeRequest::SharedDtor() { |
209 | 0 | server_addr_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
210 | 0 | } |
211 | | |
212 | 0 | void TrackMeRequest::SetCachedSize(int size) const { |
213 | 0 | _cached_size_.Set(size); |
214 | 0 | } |
215 | 0 | const ::google::protobuf::Descriptor* TrackMeRequest::descriptor() { |
216 | 0 | ::protobuf_brpc_2ftrackme_2eproto::protobuf_AssignDescriptorsOnce(); |
217 | 0 | return ::protobuf_brpc_2ftrackme_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
218 | 0 | } |
219 | | |
220 | 0 | const TrackMeRequest& TrackMeRequest::default_instance() { |
221 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_brpc_2ftrackme_2eproto::scc_info_TrackMeRequest.base); |
222 | 0 | return *internal_default_instance(); |
223 | 0 | } |
224 | | |
225 | | |
226 | 0 | void TrackMeRequest::Clear() { |
227 | | // @@protoc_insertion_point(message_clear_start:brpc.TrackMeRequest) |
228 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
229 | | // Prevent compiler warnings about cached_has_bits being unused |
230 | 0 | (void) cached_has_bits; |
231 | |
|
232 | 0 | cached_has_bits = _has_bits_[0]; |
233 | 0 | if (cached_has_bits & 0x00000001u) { |
234 | 0 | server_addr_.ClearNonDefaultToEmptyNoArena(); |
235 | 0 | } |
236 | 0 | rpc_version_ = GOOGLE_LONGLONG(0); |
237 | 0 | _has_bits_.Clear(); |
238 | 0 | _internal_metadata_.Clear(); |
239 | 0 | } |
240 | | |
241 | | bool TrackMeRequest::MergePartialFromCodedStream( |
242 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
243 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
244 | 0 | ::google::protobuf::uint32 tag; |
245 | | // @@protoc_insertion_point(parse_start:brpc.TrackMeRequest) |
246 | 0 | for (;;) { |
247 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
248 | 0 | tag = p.first; |
249 | 0 | if (!p.second) goto handle_unusual; |
250 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
251 | | // optional int64 rpc_version = 1; |
252 | 0 | case 1: { |
253 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
254 | 0 | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
255 | 0 | set_has_rpc_version(); |
256 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
257 | 0 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
258 | 0 | input, &rpc_version_))); |
259 | 0 | } else { |
260 | 0 | goto handle_unusual; |
261 | 0 | } |
262 | 0 | break; |
263 | 0 | } |
264 | | |
265 | | // optional string server_addr = 2; |
266 | 0 | case 2: { |
267 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
268 | 0 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
269 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
270 | 0 | input, this->mutable_server_addr())); |
271 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
272 | 0 | this->server_addr().data(), static_cast<int>(this->server_addr().length()), |
273 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
274 | 0 | "brpc.TrackMeRequest.server_addr"); |
275 | 0 | } else { |
276 | 0 | goto handle_unusual; |
277 | 0 | } |
278 | 0 | break; |
279 | 0 | } |
280 | | |
281 | 0 | default: { |
282 | 0 | handle_unusual: |
283 | 0 | if (tag == 0) { |
284 | 0 | goto success; |
285 | 0 | } |
286 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
287 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
288 | 0 | break; |
289 | 0 | } |
290 | 0 | } |
291 | 0 | } |
292 | 0 | success: |
293 | | // @@protoc_insertion_point(parse_success:brpc.TrackMeRequest) |
294 | 0 | return true; |
295 | 0 | failure: |
296 | | // @@protoc_insertion_point(parse_failure:brpc.TrackMeRequest) |
297 | 0 | return false; |
298 | 0 | #undef DO_ |
299 | 0 | } |
300 | | |
301 | | void TrackMeRequest::SerializeWithCachedSizes( |
302 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
303 | | // @@protoc_insertion_point(serialize_start:brpc.TrackMeRequest) |
304 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
305 | 0 | (void) cached_has_bits; |
306 | |
|
307 | 0 | cached_has_bits = _has_bits_[0]; |
308 | | // optional int64 rpc_version = 1; |
309 | 0 | if (cached_has_bits & 0x00000002u) { |
310 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->rpc_version(), output); |
311 | 0 | } |
312 | | |
313 | | // optional string server_addr = 2; |
314 | 0 | if (cached_has_bits & 0x00000001u) { |
315 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
316 | 0 | this->server_addr().data(), static_cast<int>(this->server_addr().length()), |
317 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
318 | 0 | "brpc.TrackMeRequest.server_addr"); |
319 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
320 | 0 | 2, this->server_addr(), output); |
321 | 0 | } |
322 | |
|
323 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
324 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
325 | 0 | _internal_metadata_.unknown_fields(), output); |
326 | 0 | } |
327 | | // @@protoc_insertion_point(serialize_end:brpc.TrackMeRequest) |
328 | 0 | } |
329 | | |
330 | | ::google::protobuf::uint8* TrackMeRequest::InternalSerializeWithCachedSizesToArray( |
331 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
332 | 0 | (void)deterministic; // Unused |
333 | | // @@protoc_insertion_point(serialize_to_array_start:brpc.TrackMeRequest) |
334 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
335 | 0 | (void) cached_has_bits; |
336 | |
|
337 | 0 | cached_has_bits = _has_bits_[0]; |
338 | | // optional int64 rpc_version = 1; |
339 | 0 | if (cached_has_bits & 0x00000002u) { |
340 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->rpc_version(), target); |
341 | 0 | } |
342 | | |
343 | | // optional string server_addr = 2; |
344 | 0 | if (cached_has_bits & 0x00000001u) { |
345 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
346 | 0 | this->server_addr().data(), static_cast<int>(this->server_addr().length()), |
347 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
348 | 0 | "brpc.TrackMeRequest.server_addr"); |
349 | 0 | target = |
350 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
351 | 0 | 2, this->server_addr(), target); |
352 | 0 | } |
353 | |
|
354 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
355 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
356 | 0 | _internal_metadata_.unknown_fields(), target); |
357 | 0 | } |
358 | | // @@protoc_insertion_point(serialize_to_array_end:brpc.TrackMeRequest) |
359 | 0 | return target; |
360 | 0 | } |
361 | | |
362 | 0 | size_t TrackMeRequest::ByteSizeLong() const { |
363 | | // @@protoc_insertion_point(message_byte_size_start:brpc.TrackMeRequest) |
364 | 0 | size_t total_size = 0; |
365 | |
|
366 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
367 | 0 | total_size += |
368 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
369 | 0 | _internal_metadata_.unknown_fields()); |
370 | 0 | } |
371 | 0 | if (_has_bits_[0 / 32] & 3u) { |
372 | | // optional string server_addr = 2; |
373 | 0 | if (has_server_addr()) { |
374 | 0 | total_size += 1 + |
375 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
376 | 0 | this->server_addr()); |
377 | 0 | } |
378 | | |
379 | | // optional int64 rpc_version = 1; |
380 | 0 | if (has_rpc_version()) { |
381 | 0 | total_size += 1 + |
382 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
383 | 0 | this->rpc_version()); |
384 | 0 | } |
385 | |
|
386 | 0 | } |
387 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
388 | 0 | SetCachedSize(cached_size); |
389 | 0 | return total_size; |
390 | 0 | } |
391 | | |
392 | 0 | void TrackMeRequest::MergeFrom(const ::google::protobuf::Message& from) { |
393 | | // @@protoc_insertion_point(generalized_merge_from_start:brpc.TrackMeRequest) |
394 | 0 | GOOGLE_DCHECK_NE(&from, this); |
395 | 0 | const TrackMeRequest* source = |
396 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const TrackMeRequest>( |
397 | 0 | &from); |
398 | 0 | if (source == NULL) { |
399 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:brpc.TrackMeRequest) |
400 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
401 | 0 | } else { |
402 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:brpc.TrackMeRequest) |
403 | 0 | MergeFrom(*source); |
404 | 0 | } |
405 | 0 | } |
406 | | |
407 | 0 | void TrackMeRequest::MergeFrom(const TrackMeRequest& from) { |
408 | | // @@protoc_insertion_point(class_specific_merge_from_start:brpc.TrackMeRequest) |
409 | 0 | GOOGLE_DCHECK_NE(&from, this); |
410 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
411 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
412 | 0 | (void) cached_has_bits; |
413 | |
|
414 | 0 | cached_has_bits = from._has_bits_[0]; |
415 | 0 | if (cached_has_bits & 3u) { |
416 | 0 | if (cached_has_bits & 0x00000001u) { |
417 | 0 | set_has_server_addr(); |
418 | 0 | server_addr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.server_addr_); |
419 | 0 | } |
420 | 0 | if (cached_has_bits & 0x00000002u) { |
421 | 0 | rpc_version_ = from.rpc_version_; |
422 | 0 | } |
423 | 0 | _has_bits_[0] |= cached_has_bits; |
424 | 0 | } |
425 | 0 | } |
426 | | |
427 | 0 | void TrackMeRequest::CopyFrom(const ::google::protobuf::Message& from) { |
428 | | // @@protoc_insertion_point(generalized_copy_from_start:brpc.TrackMeRequest) |
429 | 0 | if (&from == this) return; |
430 | 0 | Clear(); |
431 | 0 | MergeFrom(from); |
432 | 0 | } |
433 | | |
434 | 0 | void TrackMeRequest::CopyFrom(const TrackMeRequest& from) { |
435 | | // @@protoc_insertion_point(class_specific_copy_from_start:brpc.TrackMeRequest) |
436 | 0 | if (&from == this) return; |
437 | 0 | Clear(); |
438 | 0 | MergeFrom(from); |
439 | 0 | } |
440 | | |
441 | 0 | bool TrackMeRequest::IsInitialized() const { |
442 | 0 | return true; |
443 | 0 | } |
444 | | |
445 | 0 | void TrackMeRequest::Swap(TrackMeRequest* other) { |
446 | 0 | if (other == this) return; |
447 | 0 | InternalSwap(other); |
448 | 0 | } |
449 | 0 | void TrackMeRequest::InternalSwap(TrackMeRequest* other) { |
450 | 0 | using std::swap; |
451 | 0 | server_addr_.Swap(&other->server_addr_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
452 | 0 | GetArenaNoVirtual()); |
453 | 0 | swap(rpc_version_, other->rpc_version_); |
454 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
455 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
456 | 0 | } |
457 | | |
458 | 0 | ::google::protobuf::Metadata TrackMeRequest::GetMetadata() const { |
459 | 0 | protobuf_brpc_2ftrackme_2eproto::protobuf_AssignDescriptorsOnce(); |
460 | 0 | return ::protobuf_brpc_2ftrackme_2eproto::file_level_metadata[kIndexInFileMessages]; |
461 | 0 | } |
462 | | |
463 | | |
464 | | // =================================================================== |
465 | | |
466 | 2 | void TrackMeResponse::InitAsDefaultInstance() { |
467 | 2 | } |
468 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
469 | | const int TrackMeResponse::kSeverityFieldNumber; |
470 | | const int TrackMeResponse::kErrorTextFieldNumber; |
471 | | const int TrackMeResponse::kNewIntervalFieldNumber; |
472 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
473 | | |
474 | | TrackMeResponse::TrackMeResponse() |
475 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
476 | 2 | ::google::protobuf::internal::InitSCC( |
477 | 2 | &protobuf_brpc_2ftrackme_2eproto::scc_info_TrackMeResponse.base); |
478 | 2 | SharedCtor(); |
479 | | // @@protoc_insertion_point(constructor:brpc.TrackMeResponse) |
480 | 2 | } |
481 | | TrackMeResponse::TrackMeResponse(const TrackMeResponse& from) |
482 | 0 | : ::google::protobuf::Message(), |
483 | 0 | _internal_metadata_(NULL), |
484 | 0 | _has_bits_(from._has_bits_) { |
485 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
486 | 0 | error_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
487 | 0 | if (from.has_error_text()) { |
488 | 0 | error_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_text_); |
489 | 0 | } |
490 | 0 | ::memcpy(&severity_, &from.severity_, |
491 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&new_interval_) - |
492 | 0 | reinterpret_cast<char*>(&severity_)) + sizeof(new_interval_)); |
493 | | // @@protoc_insertion_point(copy_constructor:brpc.TrackMeResponse) |
494 | 0 | } |
495 | | |
496 | 2 | void TrackMeResponse::SharedCtor() { |
497 | 2 | error_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
498 | 2 | ::memset(&severity_, 0, static_cast<size_t>( |
499 | 2 | reinterpret_cast<char*>(&new_interval_) - |
500 | 2 | reinterpret_cast<char*>(&severity_)) + sizeof(new_interval_)); |
501 | 2 | } |
502 | | |
503 | 0 | TrackMeResponse::~TrackMeResponse() { |
504 | | // @@protoc_insertion_point(destructor:brpc.TrackMeResponse) |
505 | 0 | SharedDtor(); |
506 | 0 | } |
507 | | |
508 | 0 | void TrackMeResponse::SharedDtor() { |
509 | 0 | error_text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
510 | 0 | } |
511 | | |
512 | 0 | void TrackMeResponse::SetCachedSize(int size) const { |
513 | 0 | _cached_size_.Set(size); |
514 | 0 | } |
515 | 0 | const ::google::protobuf::Descriptor* TrackMeResponse::descriptor() { |
516 | 0 | ::protobuf_brpc_2ftrackme_2eproto::protobuf_AssignDescriptorsOnce(); |
517 | 0 | return ::protobuf_brpc_2ftrackme_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
518 | 0 | } |
519 | | |
520 | 0 | const TrackMeResponse& TrackMeResponse::default_instance() { |
521 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_brpc_2ftrackme_2eproto::scc_info_TrackMeResponse.base); |
522 | 0 | return *internal_default_instance(); |
523 | 0 | } |
524 | | |
525 | | |
526 | 0 | void TrackMeResponse::Clear() { |
527 | | // @@protoc_insertion_point(message_clear_start:brpc.TrackMeResponse) |
528 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
529 | | // Prevent compiler warnings about cached_has_bits being unused |
530 | 0 | (void) cached_has_bits; |
531 | |
|
532 | 0 | cached_has_bits = _has_bits_[0]; |
533 | 0 | if (cached_has_bits & 0x00000001u) { |
534 | 0 | error_text_.ClearNonDefaultToEmptyNoArena(); |
535 | 0 | } |
536 | 0 | if (cached_has_bits & 6u) { |
537 | 0 | ::memset(&severity_, 0, static_cast<size_t>( |
538 | 0 | reinterpret_cast<char*>(&new_interval_) - |
539 | 0 | reinterpret_cast<char*>(&severity_)) + sizeof(new_interval_)); |
540 | 0 | } |
541 | 0 | _has_bits_.Clear(); |
542 | 0 | _internal_metadata_.Clear(); |
543 | 0 | } |
544 | | |
545 | | bool TrackMeResponse::MergePartialFromCodedStream( |
546 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
547 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
548 | 0 | ::google::protobuf::uint32 tag; |
549 | | // @@protoc_insertion_point(parse_start:brpc.TrackMeResponse) |
550 | 0 | for (;;) { |
551 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
552 | 0 | tag = p.first; |
553 | 0 | if (!p.second) goto handle_unusual; |
554 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
555 | | // optional .brpc.TrackMeSeverity severity = 1; |
556 | 0 | case 1: { |
557 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
558 | 0 | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
559 | 0 | int value; |
560 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
561 | 0 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
562 | 0 | input, &value))); |
563 | 0 | if (::brpc::TrackMeSeverity_IsValid(value)) { |
564 | 0 | set_severity(static_cast< ::brpc::TrackMeSeverity >(value)); |
565 | 0 | } else { |
566 | 0 | mutable_unknown_fields()->AddVarint( |
567 | 0 | 1, static_cast< ::google::protobuf::uint64>(value)); |
568 | 0 | } |
569 | 0 | } else { |
570 | 0 | goto handle_unusual; |
571 | 0 | } |
572 | 0 | break; |
573 | 0 | } |
574 | | |
575 | | // optional string error_text = 2; |
576 | 0 | case 2: { |
577 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
578 | 0 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
579 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
580 | 0 | input, this->mutable_error_text())); |
581 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
582 | 0 | this->error_text().data(), static_cast<int>(this->error_text().length()), |
583 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
584 | 0 | "brpc.TrackMeResponse.error_text"); |
585 | 0 | } else { |
586 | 0 | goto handle_unusual; |
587 | 0 | } |
588 | 0 | break; |
589 | 0 | } |
590 | | |
591 | | // optional int32 new_interval = 3; |
592 | 0 | case 3: { |
593 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
594 | 0 | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
595 | 0 | set_has_new_interval(); |
596 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
597 | 0 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
598 | 0 | input, &new_interval_))); |
599 | 0 | } else { |
600 | 0 | goto handle_unusual; |
601 | 0 | } |
602 | 0 | break; |
603 | 0 | } |
604 | | |
605 | 0 | default: { |
606 | 0 | handle_unusual: |
607 | 0 | if (tag == 0) { |
608 | 0 | goto success; |
609 | 0 | } |
610 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
611 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
612 | 0 | break; |
613 | 0 | } |
614 | 0 | } |
615 | 0 | } |
616 | 0 | success: |
617 | | // @@protoc_insertion_point(parse_success:brpc.TrackMeResponse) |
618 | 0 | return true; |
619 | 0 | failure: |
620 | | // @@protoc_insertion_point(parse_failure:brpc.TrackMeResponse) |
621 | 0 | return false; |
622 | 0 | #undef DO_ |
623 | 0 | } |
624 | | |
625 | | void TrackMeResponse::SerializeWithCachedSizes( |
626 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
627 | | // @@protoc_insertion_point(serialize_start:brpc.TrackMeResponse) |
628 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
629 | 0 | (void) cached_has_bits; |
630 | |
|
631 | 0 | cached_has_bits = _has_bits_[0]; |
632 | | // optional .brpc.TrackMeSeverity severity = 1; |
633 | 0 | if (cached_has_bits & 0x00000002u) { |
634 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
635 | 0 | 1, this->severity(), output); |
636 | 0 | } |
637 | | |
638 | | // optional string error_text = 2; |
639 | 0 | if (cached_has_bits & 0x00000001u) { |
640 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
641 | 0 | this->error_text().data(), static_cast<int>(this->error_text().length()), |
642 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
643 | 0 | "brpc.TrackMeResponse.error_text"); |
644 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
645 | 0 | 2, this->error_text(), output); |
646 | 0 | } |
647 | | |
648 | | // optional int32 new_interval = 3; |
649 | 0 | if (cached_has_bits & 0x00000004u) { |
650 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->new_interval(), output); |
651 | 0 | } |
652 | |
|
653 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
654 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
655 | 0 | _internal_metadata_.unknown_fields(), output); |
656 | 0 | } |
657 | | // @@protoc_insertion_point(serialize_end:brpc.TrackMeResponse) |
658 | 0 | } |
659 | | |
660 | | ::google::protobuf::uint8* TrackMeResponse::InternalSerializeWithCachedSizesToArray( |
661 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
662 | 0 | (void)deterministic; // Unused |
663 | | // @@protoc_insertion_point(serialize_to_array_start:brpc.TrackMeResponse) |
664 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
665 | 0 | (void) cached_has_bits; |
666 | |
|
667 | 0 | cached_has_bits = _has_bits_[0]; |
668 | | // optional .brpc.TrackMeSeverity severity = 1; |
669 | 0 | if (cached_has_bits & 0x00000002u) { |
670 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
671 | 0 | 1, this->severity(), target); |
672 | 0 | } |
673 | | |
674 | | // optional string error_text = 2; |
675 | 0 | if (cached_has_bits & 0x00000001u) { |
676 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
677 | 0 | this->error_text().data(), static_cast<int>(this->error_text().length()), |
678 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
679 | 0 | "brpc.TrackMeResponse.error_text"); |
680 | 0 | target = |
681 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
682 | 0 | 2, this->error_text(), target); |
683 | 0 | } |
684 | | |
685 | | // optional int32 new_interval = 3; |
686 | 0 | if (cached_has_bits & 0x00000004u) { |
687 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->new_interval(), target); |
688 | 0 | } |
689 | |
|
690 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
691 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
692 | 0 | _internal_metadata_.unknown_fields(), target); |
693 | 0 | } |
694 | | // @@protoc_insertion_point(serialize_to_array_end:brpc.TrackMeResponse) |
695 | 0 | return target; |
696 | 0 | } |
697 | | |
698 | 0 | size_t TrackMeResponse::ByteSizeLong() const { |
699 | | // @@protoc_insertion_point(message_byte_size_start:brpc.TrackMeResponse) |
700 | 0 | size_t total_size = 0; |
701 | |
|
702 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
703 | 0 | total_size += |
704 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
705 | 0 | _internal_metadata_.unknown_fields()); |
706 | 0 | } |
707 | 0 | if (_has_bits_[0 / 32] & 7u) { |
708 | | // optional string error_text = 2; |
709 | 0 | if (has_error_text()) { |
710 | 0 | total_size += 1 + |
711 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
712 | 0 | this->error_text()); |
713 | 0 | } |
714 | | |
715 | | // optional .brpc.TrackMeSeverity severity = 1; |
716 | 0 | if (has_severity()) { |
717 | 0 | total_size += 1 + |
718 | 0 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->severity()); |
719 | 0 | } |
720 | | |
721 | | // optional int32 new_interval = 3; |
722 | 0 | if (has_new_interval()) { |
723 | 0 | total_size += 1 + |
724 | 0 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
725 | 0 | this->new_interval()); |
726 | 0 | } |
727 | |
|
728 | 0 | } |
729 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
730 | 0 | SetCachedSize(cached_size); |
731 | 0 | return total_size; |
732 | 0 | } |
733 | | |
734 | 0 | void TrackMeResponse::MergeFrom(const ::google::protobuf::Message& from) { |
735 | | // @@protoc_insertion_point(generalized_merge_from_start:brpc.TrackMeResponse) |
736 | 0 | GOOGLE_DCHECK_NE(&from, this); |
737 | 0 | const TrackMeResponse* source = |
738 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const TrackMeResponse>( |
739 | 0 | &from); |
740 | 0 | if (source == NULL) { |
741 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:brpc.TrackMeResponse) |
742 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
743 | 0 | } else { |
744 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:brpc.TrackMeResponse) |
745 | 0 | MergeFrom(*source); |
746 | 0 | } |
747 | 0 | } |
748 | | |
749 | 0 | void TrackMeResponse::MergeFrom(const TrackMeResponse& from) { |
750 | | // @@protoc_insertion_point(class_specific_merge_from_start:brpc.TrackMeResponse) |
751 | 0 | GOOGLE_DCHECK_NE(&from, this); |
752 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
753 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
754 | 0 | (void) cached_has_bits; |
755 | |
|
756 | 0 | cached_has_bits = from._has_bits_[0]; |
757 | 0 | if (cached_has_bits & 7u) { |
758 | 0 | if (cached_has_bits & 0x00000001u) { |
759 | 0 | set_has_error_text(); |
760 | 0 | error_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_text_); |
761 | 0 | } |
762 | 0 | if (cached_has_bits & 0x00000002u) { |
763 | 0 | severity_ = from.severity_; |
764 | 0 | } |
765 | 0 | if (cached_has_bits & 0x00000004u) { |
766 | 0 | new_interval_ = from.new_interval_; |
767 | 0 | } |
768 | 0 | _has_bits_[0] |= cached_has_bits; |
769 | 0 | } |
770 | 0 | } |
771 | | |
772 | 0 | void TrackMeResponse::CopyFrom(const ::google::protobuf::Message& from) { |
773 | | // @@protoc_insertion_point(generalized_copy_from_start:brpc.TrackMeResponse) |
774 | 0 | if (&from == this) return; |
775 | 0 | Clear(); |
776 | 0 | MergeFrom(from); |
777 | 0 | } |
778 | | |
779 | 0 | void TrackMeResponse::CopyFrom(const TrackMeResponse& from) { |
780 | | // @@protoc_insertion_point(class_specific_copy_from_start:brpc.TrackMeResponse) |
781 | 0 | if (&from == this) return; |
782 | 0 | Clear(); |
783 | 0 | MergeFrom(from); |
784 | 0 | } |
785 | | |
786 | 0 | bool TrackMeResponse::IsInitialized() const { |
787 | 0 | return true; |
788 | 0 | } |
789 | | |
790 | 0 | void TrackMeResponse::Swap(TrackMeResponse* other) { |
791 | 0 | if (other == this) return; |
792 | 0 | InternalSwap(other); |
793 | 0 | } |
794 | 0 | void TrackMeResponse::InternalSwap(TrackMeResponse* other) { |
795 | 0 | using std::swap; |
796 | 0 | error_text_.Swap(&other->error_text_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
797 | 0 | GetArenaNoVirtual()); |
798 | 0 | swap(severity_, other->severity_); |
799 | 0 | swap(new_interval_, other->new_interval_); |
800 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
801 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
802 | 0 | } |
803 | | |
804 | 0 | ::google::protobuf::Metadata TrackMeResponse::GetMetadata() const { |
805 | 0 | protobuf_brpc_2ftrackme_2eproto::protobuf_AssignDescriptorsOnce(); |
806 | 0 | return ::protobuf_brpc_2ftrackme_2eproto::file_level_metadata[kIndexInFileMessages]; |
807 | 0 | } |
808 | | |
809 | | |
810 | | // =================================================================== |
811 | | |
812 | 0 | TrackMeService::~TrackMeService() {} |
813 | | |
814 | 0 | const ::google::protobuf::ServiceDescriptor* TrackMeService::descriptor() { |
815 | 0 | protobuf_brpc_2ftrackme_2eproto::protobuf_AssignDescriptorsOnce(); |
816 | 0 | return protobuf_brpc_2ftrackme_2eproto::file_level_service_descriptors[0]; |
817 | 0 | } |
818 | | |
819 | 0 | const ::google::protobuf::ServiceDescriptor* TrackMeService::GetDescriptor() { |
820 | 0 | return descriptor(); |
821 | 0 | } |
822 | | |
823 | | void TrackMeService::TrackMe(::google::protobuf::RpcController* controller, |
824 | | const ::brpc::TrackMeRequest*, |
825 | | ::brpc::TrackMeResponse*, |
826 | 0 | ::google::protobuf::Closure* done) { |
827 | 0 | controller->SetFailed("Method TrackMe() not implemented."); |
828 | 0 | done->Run(); |
829 | 0 | } |
830 | | |
831 | | void TrackMeService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
832 | | ::google::protobuf::RpcController* controller, |
833 | | const ::google::protobuf::Message* request, |
834 | | ::google::protobuf::Message* response, |
835 | 0 | ::google::protobuf::Closure* done) { |
836 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_brpc_2ftrackme_2eproto::file_level_service_descriptors[0]); |
837 | 0 | switch(method->index()) { |
838 | 0 | case 0: |
839 | 0 | TrackMe(controller, |
840 | 0 | ::google::protobuf::down_cast<const ::brpc::TrackMeRequest*>(request), |
841 | 0 | ::google::protobuf::down_cast< ::brpc::TrackMeResponse*>(response), |
842 | 0 | done); |
843 | 0 | break; |
844 | 0 | default: |
845 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
846 | 0 | break; |
847 | 0 | } |
848 | 0 | } |
849 | | |
850 | | const ::google::protobuf::Message& TrackMeService::GetRequestPrototype( |
851 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
852 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
853 | 0 | switch(method->index()) { |
854 | 0 | case 0: |
855 | 0 | return ::brpc::TrackMeRequest::default_instance(); |
856 | 0 | default: |
857 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
858 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
859 | 0 | ->GetPrototype(method->input_type()); |
860 | 0 | } |
861 | 0 | } |
862 | | |
863 | | const ::google::protobuf::Message& TrackMeService::GetResponsePrototype( |
864 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
865 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
866 | 0 | switch(method->index()) { |
867 | 0 | case 0: |
868 | 0 | return ::brpc::TrackMeResponse::default_instance(); |
869 | 0 | default: |
870 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
871 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
872 | 0 | ->GetPrototype(method->output_type()); |
873 | 0 | } |
874 | 0 | } |
875 | | |
876 | | TrackMeService_Stub::TrackMeService_Stub(::google::protobuf::RpcChannel* channel) |
877 | 0 | : channel_(channel), owns_channel_(false) {} |
878 | | TrackMeService_Stub::TrackMeService_Stub( |
879 | | ::google::protobuf::RpcChannel* channel, |
880 | | ::google::protobuf::Service::ChannelOwnership ownership) |
881 | 0 | : channel_(channel), |
882 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
883 | 0 | TrackMeService_Stub::~TrackMeService_Stub() { |
884 | 0 | if (owns_channel_) delete channel_; |
885 | 0 | } |
886 | | |
887 | | void TrackMeService_Stub::TrackMe(::google::protobuf::RpcController* controller, |
888 | | const ::brpc::TrackMeRequest* request, |
889 | | ::brpc::TrackMeResponse* response, |
890 | 0 | ::google::protobuf::Closure* done) { |
891 | 0 | channel_->CallMethod(descriptor()->method(0), |
892 | 0 | controller, request, response, done); |
893 | 0 | } |
894 | | |
895 | | // @@protoc_insertion_point(namespace_scope) |
896 | | } // namespace brpc |
897 | | namespace google { |
898 | | namespace protobuf { |
899 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::brpc::TrackMeRequest* Arena::CreateMaybeMessage< ::brpc::TrackMeRequest >(Arena* arena) { |
900 | 0 | return Arena::CreateInternal< ::brpc::TrackMeRequest >(arena); |
901 | 0 | } |
902 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::brpc::TrackMeResponse* Arena::CreateMaybeMessage< ::brpc::TrackMeResponse >(Arena* arena) { |
903 | 0 | return Arena::CreateInternal< ::brpc::TrackMeResponse >(arena); |
904 | 0 | } |
905 | | } // namespace protobuf |
906 | | } // namespace google |
907 | | |
908 | | // @@protoc_insertion_point(global_scope) |