/src/brpc/build/test/snappy_message.pb.h
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: snappy_message.proto |
3 | | |
4 | | #ifndef PROTOBUF_INCLUDED_snappy_5fmessage_2eproto |
5 | | #define PROTOBUF_INCLUDED_snappy_5fmessage_2eproto |
6 | | |
7 | | #include <string> |
8 | | |
9 | | #include <google/protobuf/stubs/common.h> |
10 | | |
11 | | #if GOOGLE_PROTOBUF_VERSION < 3006001 |
12 | | #error This file was generated by a newer version of protoc which is |
13 | | #error incompatible with your Protocol Buffer headers. Please update |
14 | | #error your headers. |
15 | | #endif |
16 | | #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION |
17 | | #error This file was generated by an older version of protoc which is |
18 | | #error incompatible with your Protocol Buffer headers. Please |
19 | | #error regenerate this file with a newer version of protoc. |
20 | | #endif |
21 | | |
22 | | #include <google/protobuf/io/coded_stream.h> |
23 | | #include <google/protobuf/arena.h> |
24 | | #include <google/protobuf/arenastring.h> |
25 | | #include <google/protobuf/generated_message_table_driven.h> |
26 | | #include <google/protobuf/generated_message_util.h> |
27 | | #include <google/protobuf/inlined_string_field.h> |
28 | | #include <google/protobuf/metadata.h> |
29 | | #include <google/protobuf/message.h> |
30 | | #include <google/protobuf/repeated_field.h> // IWYU pragma: export |
31 | | #include <google/protobuf/extension_set.h> // IWYU pragma: export |
32 | | #include <google/protobuf/unknown_field_set.h> |
33 | | // @@protoc_insertion_point(includes) |
34 | | #define PROTOBUF_INTERNAL_EXPORT_protobuf_snappy_5fmessage_2eproto |
35 | | |
36 | | namespace protobuf_snappy_5fmessage_2eproto { |
37 | | // Internal implementation detail -- do not use these members. |
38 | | struct TableStruct { |
39 | | static const ::google::protobuf::internal::ParseTableField entries[]; |
40 | | static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; |
41 | | static const ::google::protobuf::internal::ParseTable schema[1]; |
42 | | static const ::google::protobuf::internal::FieldMetadata field_metadata[]; |
43 | | static const ::google::protobuf::internal::SerializationTable serialization_table[]; |
44 | | static const ::google::protobuf::uint32 offsets[]; |
45 | | }; |
46 | | void AddDescriptors(); |
47 | | } // namespace protobuf_snappy_5fmessage_2eproto |
48 | | namespace snappy_message { |
49 | | class SnappyMessageProto; |
50 | | class SnappyMessageProtoDefaultTypeInternal; |
51 | | extern SnappyMessageProtoDefaultTypeInternal _SnappyMessageProto_default_instance_; |
52 | | } // namespace snappy_message |
53 | | namespace google { |
54 | | namespace protobuf { |
55 | | template<> ::snappy_message::SnappyMessageProto* Arena::CreateMaybeMessage<::snappy_message::SnappyMessageProto>(Arena*); |
56 | | } // namespace protobuf |
57 | | } // namespace google |
58 | | namespace snappy_message { |
59 | | |
60 | | // =================================================================== |
61 | | |
62 | | class SnappyMessageProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:snappy_message.SnappyMessageProto) */ { |
63 | | public: |
64 | | SnappyMessageProto(); |
65 | | virtual ~SnappyMessageProto(); |
66 | | |
67 | | SnappyMessageProto(const SnappyMessageProto& from); |
68 | | |
69 | 0 | inline SnappyMessageProto& operator=(const SnappyMessageProto& from) { |
70 | 0 | CopyFrom(from); |
71 | 0 | return *this; |
72 | 0 | } |
73 | | #if LANG_CXX11 |
74 | | SnappyMessageProto(SnappyMessageProto&& from) noexcept |
75 | 0 | : SnappyMessageProto() { |
76 | 0 | *this = ::std::move(from); |
77 | 0 | } |
78 | | |
79 | 0 | inline SnappyMessageProto& operator=(SnappyMessageProto&& from) noexcept { |
80 | 0 | if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { |
81 | 0 | if (this != &from) InternalSwap(&from); |
82 | 0 | } else { |
83 | 0 | CopyFrom(from); |
84 | 0 | } |
85 | 0 | return *this; |
86 | 0 | } |
87 | | #endif |
88 | 0 | inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { |
89 | 0 | return _internal_metadata_.unknown_fields(); |
90 | 0 | } |
91 | 0 | inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { |
92 | 0 | return _internal_metadata_.mutable_unknown_fields(); |
93 | 0 | } |
94 | | |
95 | | static const ::google::protobuf::Descriptor* descriptor(); |
96 | | static const SnappyMessageProto& default_instance(); |
97 | | |
98 | | static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY |
99 | 0 | static inline const SnappyMessageProto* internal_default_instance() { |
100 | 0 | return reinterpret_cast<const SnappyMessageProto*>( |
101 | 0 | &_SnappyMessageProto_default_instance_); |
102 | 0 | } |
103 | | static constexpr int kIndexInFileMessages = |
104 | | 0; |
105 | | |
106 | | void Swap(SnappyMessageProto* other); |
107 | 0 | friend void swap(SnappyMessageProto& a, SnappyMessageProto& b) { |
108 | 0 | a.Swap(&b); |
109 | 0 | } |
110 | | |
111 | | // implements Message ---------------------------------------------- |
112 | | |
113 | 0 | inline SnappyMessageProto* New() const final { |
114 | 0 | return CreateMaybeMessage<SnappyMessageProto>(NULL); |
115 | 0 | } |
116 | | |
117 | 0 | SnappyMessageProto* New(::google::protobuf::Arena* arena) const final { |
118 | 0 | return CreateMaybeMessage<SnappyMessageProto>(arena); |
119 | 0 | } |
120 | | void CopyFrom(const ::google::protobuf::Message& from) final; |
121 | | void MergeFrom(const ::google::protobuf::Message& from) final; |
122 | | void CopyFrom(const SnappyMessageProto& from); |
123 | | void MergeFrom(const SnappyMessageProto& from); |
124 | | void Clear() final; |
125 | | bool IsInitialized() const final; |
126 | | |
127 | | size_t ByteSizeLong() const final; |
128 | | bool MergePartialFromCodedStream( |
129 | | ::google::protobuf::io::CodedInputStream* input) final; |
130 | | void SerializeWithCachedSizes( |
131 | | ::google::protobuf::io::CodedOutputStream* output) const final; |
132 | | ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( |
133 | | bool deterministic, ::google::protobuf::uint8* target) const final; |
134 | 0 | int GetCachedSize() const final { return _cached_size_.Get(); } |
135 | | |
136 | | private: |
137 | | void SharedCtor(); |
138 | | void SharedDtor(); |
139 | | void SetCachedSize(int size) const final; |
140 | | void InternalSwap(SnappyMessageProto* other); |
141 | | private: |
142 | 0 | inline ::google::protobuf::Arena* GetArenaNoVirtual() const { |
143 | 0 | return NULL; |
144 | 0 | } |
145 | 0 | inline void* MaybeArenaPtr() const { |
146 | 0 | return NULL; |
147 | 0 | } |
148 | | public: |
149 | | |
150 | | ::google::protobuf::Metadata GetMetadata() const final; |
151 | | |
152 | | // nested types ---------------------------------------------------- |
153 | | |
154 | | // accessors ------------------------------------------------------- |
155 | | |
156 | | // repeated int32 numbers = 2; |
157 | | int numbers_size() const; |
158 | | void clear_numbers(); |
159 | | static const int kNumbersFieldNumber = 2; |
160 | | ::google::protobuf::int32 numbers(int index) const; |
161 | | void set_numbers(int index, ::google::protobuf::int32 value); |
162 | | void add_numbers(::google::protobuf::int32 value); |
163 | | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
164 | | numbers() const; |
165 | | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
166 | | mutable_numbers(); |
167 | | |
168 | | // optional string text = 1; |
169 | | bool has_text() const; |
170 | | void clear_text(); |
171 | | static const int kTextFieldNumber = 1; |
172 | | const ::std::string& text() const; |
173 | | void set_text(const ::std::string& value); |
174 | | #if LANG_CXX11 |
175 | | void set_text(::std::string&& value); |
176 | | #endif |
177 | | void set_text(const char* value); |
178 | | void set_text(const char* value, size_t size); |
179 | | ::std::string* mutable_text(); |
180 | | ::std::string* release_text(); |
181 | | void set_allocated_text(::std::string* text); |
182 | | |
183 | | // @@protoc_insertion_point(class_scope:snappy_message.SnappyMessageProto) |
184 | | private: |
185 | | void set_has_text(); |
186 | | void clear_has_text(); |
187 | | |
188 | | ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; |
189 | | ::google::protobuf::internal::HasBits<1> _has_bits_; |
190 | | mutable ::google::protobuf::internal::CachedSize _cached_size_; |
191 | | ::google::protobuf::RepeatedField< ::google::protobuf::int32 > numbers_; |
192 | | ::google::protobuf::internal::ArenaStringPtr text_; |
193 | | friend struct ::protobuf_snappy_5fmessage_2eproto::TableStruct; |
194 | | }; |
195 | | // =================================================================== |
196 | | |
197 | | |
198 | | // =================================================================== |
199 | | |
200 | | #ifdef __GNUC__ |
201 | | #pragma GCC diagnostic push |
202 | | #pragma GCC diagnostic ignored "-Wstrict-aliasing" |
203 | | #endif // __GNUC__ |
204 | | // SnappyMessageProto |
205 | | |
206 | | // optional string text = 1; |
207 | 0 | inline bool SnappyMessageProto::has_text() const { |
208 | 0 | return (_has_bits_[0] & 0x00000001u) != 0; |
209 | 0 | } |
210 | 0 | inline void SnappyMessageProto::set_has_text() { |
211 | 0 | _has_bits_[0] |= 0x00000001u; |
212 | 0 | } |
213 | 0 | inline void SnappyMessageProto::clear_has_text() { |
214 | 0 | _has_bits_[0] &= ~0x00000001u; |
215 | 0 | } |
216 | 0 | inline void SnappyMessageProto::clear_text() { |
217 | 0 | text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
218 | 0 | clear_has_text(); |
219 | 0 | } |
220 | 0 | inline const ::std::string& SnappyMessageProto::text() const { |
221 | | // @@protoc_insertion_point(field_get:snappy_message.SnappyMessageProto.text) |
222 | 0 | return text_.GetNoArena(); |
223 | 0 | } |
224 | 0 | inline void SnappyMessageProto::set_text(const ::std::string& value) { |
225 | 0 | set_has_text(); |
226 | 0 | text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
227 | 0 | // @@protoc_insertion_point(field_set:snappy_message.SnappyMessageProto.text) |
228 | 0 | } |
229 | | #if LANG_CXX11 |
230 | 0 | inline void SnappyMessageProto::set_text(::std::string&& value) { |
231 | 0 | set_has_text(); |
232 | 0 | text_.SetNoArena( |
233 | 0 | &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); |
234 | 0 | // @@protoc_insertion_point(field_set_rvalue:snappy_message.SnappyMessageProto.text) |
235 | 0 | } |
236 | | #endif |
237 | 0 | inline void SnappyMessageProto::set_text(const char* value) { |
238 | 0 | GOOGLE_DCHECK(value != NULL); |
239 | 0 | set_has_text(); |
240 | 0 | text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
241 | 0 | // @@protoc_insertion_point(field_set_char:snappy_message.SnappyMessageProto.text) |
242 | 0 | } |
243 | 0 | inline void SnappyMessageProto::set_text(const char* value, size_t size) { |
244 | 0 | set_has_text(); |
245 | 0 | text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
246 | 0 | ::std::string(reinterpret_cast<const char*>(value), size)); |
247 | 0 | // @@protoc_insertion_point(field_set_pointer:snappy_message.SnappyMessageProto.text) |
248 | 0 | } |
249 | 0 | inline ::std::string* SnappyMessageProto::mutable_text() { |
250 | 0 | set_has_text(); |
251 | | // @@protoc_insertion_point(field_mutable:snappy_message.SnappyMessageProto.text) |
252 | 0 | return text_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
253 | 0 | } |
254 | 0 | inline ::std::string* SnappyMessageProto::release_text() { |
255 | 0 | // @@protoc_insertion_point(field_release:snappy_message.SnappyMessageProto.text) |
256 | 0 | if (!has_text()) { |
257 | 0 | return NULL; |
258 | 0 | } |
259 | 0 | clear_has_text(); |
260 | 0 | return text_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
261 | 0 | } |
262 | 0 | inline void SnappyMessageProto::set_allocated_text(::std::string* text) { |
263 | 0 | if (text != NULL) { |
264 | 0 | set_has_text(); |
265 | 0 | } else { |
266 | 0 | clear_has_text(); |
267 | 0 | } |
268 | 0 | text_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), text); |
269 | 0 | // @@protoc_insertion_point(field_set_allocated:snappy_message.SnappyMessageProto.text) |
270 | 0 | } |
271 | | |
272 | | // repeated int32 numbers = 2; |
273 | 0 | inline int SnappyMessageProto::numbers_size() const { |
274 | 0 | return numbers_.size(); |
275 | 0 | } |
276 | 0 | inline void SnappyMessageProto::clear_numbers() { |
277 | 0 | numbers_.Clear(); |
278 | 0 | } |
279 | 0 | inline ::google::protobuf::int32 SnappyMessageProto::numbers(int index) const { |
280 | | // @@protoc_insertion_point(field_get:snappy_message.SnappyMessageProto.numbers) |
281 | 0 | return numbers_.Get(index); |
282 | 0 | } |
283 | 0 | inline void SnappyMessageProto::set_numbers(int index, ::google::protobuf::int32 value) { |
284 | 0 | numbers_.Set(index, value); |
285 | 0 | // @@protoc_insertion_point(field_set:snappy_message.SnappyMessageProto.numbers) |
286 | 0 | } |
287 | 0 | inline void SnappyMessageProto::add_numbers(::google::protobuf::int32 value) { |
288 | 0 | numbers_.Add(value); |
289 | 0 | // @@protoc_insertion_point(field_add:snappy_message.SnappyMessageProto.numbers) |
290 | 0 | } |
291 | | inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
292 | 0 | SnappyMessageProto::numbers() const { |
293 | 0 | // @@protoc_insertion_point(field_list:snappy_message.SnappyMessageProto.numbers) |
294 | 0 | return numbers_; |
295 | 0 | } |
296 | | inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
297 | 0 | SnappyMessageProto::mutable_numbers() { |
298 | | // @@protoc_insertion_point(field_mutable_list:snappy_message.SnappyMessageProto.numbers) |
299 | 0 | return &numbers_; |
300 | 0 | } |
301 | | |
302 | | #ifdef __GNUC__ |
303 | | #pragma GCC diagnostic pop |
304 | | #endif // __GNUC__ |
305 | | |
306 | | // @@protoc_insertion_point(namespace_scope) |
307 | | |
308 | | } // namespace snappy_message |
309 | | |
310 | | // @@protoc_insertion_point(global_scope) |
311 | | |
312 | | #endif // PROTOBUF_INCLUDED_snappy_5fmessage_2eproto |