OLD | NEW |
1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 // source: google/protobuf/any.proto | 2 // source: google/protobuf/any.proto |
3 | 3 |
4 #ifndef PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED | 4 #ifndef PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED |
5 #define PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED | 5 #define PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include <google/protobuf/stubs/common.h> | 9 #include <google/protobuf/stubs/common.h> |
10 | 10 |
11 #if GOOGLE_PROTOBUF_VERSION < 3000000 | 11 #if GOOGLE_PROTOBUF_VERSION < 3001000 |
12 #error This file was generated by a newer version of protoc which is | 12 #error This file was generated by a newer version of protoc which is |
13 #error incompatible with your Protocol Buffer headers. Please update | 13 #error incompatible with your Protocol Buffer headers. Please update |
14 #error your headers. | 14 #error your headers. |
15 #endif | 15 #endif |
16 #if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION | 16 #if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION |
17 #error This file was generated by an older version of protoc which is | 17 #error This file was generated by an older version of protoc which is |
18 #error incompatible with your Protocol Buffer headers. Please | 18 #error incompatible with your Protocol Buffer headers. Please |
19 #error regenerate this file with a newer version of protoc. | 19 #error regenerate this file with a newer version of protoc. |
20 #endif | 20 #endif |
21 | 21 |
22 #include <google/protobuf/arena.h> | 22 #include <google/protobuf/arena.h> |
23 #include <google/protobuf/arenastring.h> | 23 #include <google/protobuf/arenastring.h> |
24 #include <google/protobuf/generated_message_util.h> | 24 #include <google/protobuf/generated_message_util.h> |
25 #include <google/protobuf/metadata.h> | 25 #include <google/protobuf/metadata.h> |
26 #include <google/protobuf/message.h> | 26 #include <google/protobuf/message.h> |
27 #include <google/protobuf/repeated_field.h> | 27 #include <google/protobuf/repeated_field.h> // IWYU pragma: export |
28 #include <google/protobuf/extension_set.h> | 28 #include <google/protobuf/extension_set.h> // IWYU pragma: export |
29 #include <google/protobuf/unknown_field_set.h> | 29 #include <google/protobuf/unknown_field_set.h> |
30 #include <google/protobuf/any.h> | 30 #include <google/protobuf/any.h> |
31 // @@protoc_insertion_point(includes) | 31 // @@protoc_insertion_point(includes) |
| 32 namespace google { |
| 33 namespace protobuf { |
| 34 class Any; |
| 35 class AnyDefaultTypeInternal; |
| 36 LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_; |
| 37 } // namespace protobuf |
| 38 } // namespace google |
32 | 39 |
33 namespace google { | 40 namespace google { |
34 namespace protobuf { | 41 namespace protobuf { |
35 | 42 |
36 // Internal implementation detail -- do not call these. | 43 // Internal implementation detail -- do not call these. |
37 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto(); | 44 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto(); |
38 void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto(); | 45 void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fany_2eproto(); |
39 void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); | |
40 | |
41 class Any; | |
42 | 46 |
43 // =================================================================== | 47 // =================================================================== |
44 | 48 |
45 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message { | 49 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in
sertion_point(class_definition:google.protobuf.Any) */ { |
46 public: | 50 public: |
47 Any(); | 51 Any(); |
48 virtual ~Any(); | 52 virtual ~Any(); |
49 | 53 |
50 Any(const Any& from); | 54 Any(const Any& from); |
51 | 55 |
52 inline Any& operator=(const Any& from) { | 56 inline Any& operator=(const Any& from) { |
53 CopyFrom(from); | 57 CopyFrom(from); |
54 return *this; | 58 return *this; |
55 } | 59 } |
56 | 60 |
57 static const ::google::protobuf::Descriptor* descriptor(); | 61 static const ::google::protobuf::Descriptor* descriptor(); |
58 static const Any& default_instance(); | 62 static const Any& default_instance(); |
59 | 63 |
| 64 static inline const Any* internal_default_instance() { |
| 65 return reinterpret_cast<const Any*>( |
| 66 &_Any_default_instance_); |
| 67 } |
| 68 |
60 // implements Any ----------------------------------------------- | 69 // implements Any ----------------------------------------------- |
61 | 70 |
62 void PackFrom(const ::google::protobuf::Message& message); | 71 void PackFrom(const ::google::protobuf::Message& message); |
63 void PackFrom(const ::google::protobuf::Message& message, | 72 void PackFrom(const ::google::protobuf::Message& message, |
64 const ::std::string& type_url_prefix); | 73 const ::std::string& type_url_prefix); |
65 bool UnpackTo(::google::protobuf::Message* message) const; | 74 bool UnpackTo(::google::protobuf::Message* message) const; |
66 template<typename T> bool Is() const { | 75 template<typename T> bool Is() const { |
67 return _any_metadata_.Is<T>(); | 76 return _any_metadata_.Is<T>(); |
68 } | 77 } |
69 | 78 |
70 void Swap(Any* other); | 79 void Swap(Any* other); |
71 | 80 |
72 // implements Message ---------------------------------------------- | 81 // implements Message ---------------------------------------------- |
73 | 82 |
74 inline Any* New() const { return New(NULL); } | 83 inline Any* New() const PROTOBUF_FINAL { return New(NULL); } |
75 | 84 |
76 Any* New(::google::protobuf::Arena* arena) const; | 85 Any* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; |
77 void CopyFrom(const ::google::protobuf::Message& from); | 86 void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; |
78 void MergeFrom(const ::google::protobuf::Message& from); | 87 void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; |
79 void CopyFrom(const Any& from); | 88 void CopyFrom(const Any& from); |
80 void MergeFrom(const Any& from); | 89 void MergeFrom(const Any& from); |
81 void Clear(); | 90 void Clear() PROTOBUF_FINAL; |
82 bool IsInitialized() const; | 91 bool IsInitialized() const PROTOBUF_FINAL; |
83 | 92 |
84 int ByteSize() const; | 93 size_t ByteSizeLong() const PROTOBUF_FINAL; |
85 bool MergePartialFromCodedStream( | 94 bool MergePartialFromCodedStream( |
86 ::google::protobuf::io::CodedInputStream* input); | 95 ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; |
87 void SerializeWithCachedSizes( | 96 void SerializeWithCachedSizes( |
88 ::google::protobuf::io::CodedOutputStream* output) const; | 97 ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; |
89 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf:
:uint8* output) const; | 98 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( |
90 int GetCachedSize() const { return _cached_size_; } | 99 bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINA
L; |
| 100 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf:
:uint8* output) |
| 101 const PROTOBUF_FINAL { |
| 102 return InternalSerializeWithCachedSizesToArray(false, output); |
| 103 } |
| 104 int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } |
91 private: | 105 private: |
92 void SharedCtor(); | 106 void SharedCtor(); |
93 void SharedDtor(); | 107 void SharedDtor(); |
94 void SetCachedSize(int size) const; | 108 void SetCachedSize(int size) const PROTOBUF_FINAL; |
95 void InternalSwap(Any* other); | 109 void InternalSwap(Any* other); |
96 private: | 110 private: |
97 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { | 111 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { |
98 return _internal_metadata_.arena(); | 112 return NULL; |
99 } | 113 } |
100 inline void* MaybeArenaPtr() const { | 114 inline void* MaybeArenaPtr() const { |
101 return _internal_metadata_.raw_arena_ptr(); | 115 return NULL; |
102 } | 116 } |
103 public: | 117 public: |
104 | 118 |
105 ::google::protobuf::Metadata GetMetadata() const; | 119 ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; |
106 | 120 |
107 // nested types ---------------------------------------------------- | 121 // nested types ---------------------------------------------------- |
108 | 122 |
109 // accessors ------------------------------------------------------- | 123 // accessors ------------------------------------------------------- |
110 | 124 |
111 // optional string type_url = 1; | 125 // string type_url = 1; |
112 void clear_type_url(); | 126 void clear_type_url(); |
113 static const int kTypeUrlFieldNumber = 1; | 127 static const int kTypeUrlFieldNumber = 1; |
114 const ::std::string& type_url() const; | 128 const ::std::string& type_url() const; |
115 void set_type_url(const ::std::string& value); | 129 void set_type_url(const ::std::string& value); |
| 130 #if LANG_CXX11 |
| 131 void set_type_url(::std::string&& value); |
| 132 #endif |
116 void set_type_url(const char* value); | 133 void set_type_url(const char* value); |
117 void set_type_url(const char* value, size_t size); | 134 void set_type_url(const char* value, size_t size); |
118 ::std::string* mutable_type_url(); | 135 ::std::string* mutable_type_url(); |
119 ::std::string* release_type_url(); | 136 ::std::string* release_type_url(); |
120 void set_allocated_type_url(::std::string* type_url); | 137 void set_allocated_type_url(::std::string* type_url); |
121 | 138 |
122 // optional bytes value = 2; | 139 // bytes value = 2; |
123 void clear_value(); | 140 void clear_value(); |
124 static const int kValueFieldNumber = 2; | 141 static const int kValueFieldNumber = 2; |
125 const ::std::string& value() const; | 142 const ::std::string& value() const; |
126 void set_value(const ::std::string& value); | 143 void set_value(const ::std::string& value); |
| 144 #if LANG_CXX11 |
| 145 void set_value(::std::string&& value); |
| 146 #endif |
127 void set_value(const char* value); | 147 void set_value(const char* value); |
128 void set_value(const void* value, size_t size); | 148 void set_value(const void* value, size_t size); |
129 ::std::string* mutable_value(); | 149 ::std::string* mutable_value(); |
130 ::std::string* release_value(); | 150 ::std::string* release_value(); |
131 void set_allocated_value(::std::string* value); | 151 void set_allocated_value(::std::string* value); |
132 | 152 |
133 // @@protoc_insertion_point(class_scope:google.protobuf.Any) | 153 // @@protoc_insertion_point(class_scope:google.protobuf.Any) |
134 private: | 154 private: |
135 | 155 |
136 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; | 156 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; |
137 bool _is_default_instance_; | |
138 ::google::protobuf::internal::ArenaStringPtr type_url_; | 157 ::google::protobuf::internal::ArenaStringPtr type_url_; |
139 ::google::protobuf::internal::ArenaStringPtr value_; | 158 ::google::protobuf::internal::ArenaStringPtr value_; |
140 mutable int _cached_size_; | 159 mutable int _cached_size_; |
141 ::google::protobuf::internal::AnyMetadata _any_metadata_; | 160 ::google::protobuf::internal::AnyMetadata _any_metadata_; |
142 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eprot
o(); | 161 friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fany_2
eproto_impl(); |
143 friend void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto(); | 162 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eprot
o_impl(); |
| 163 friend const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2f
any_2eproto(); |
144 friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); | 164 friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); |
145 | 165 |
146 void InitAsDefaultInstance(); | |
147 static Any* default_instance_; | |
148 }; | 166 }; |
149 // =================================================================== | 167 // =================================================================== |
150 | 168 |
151 | 169 |
152 // =================================================================== | 170 // =================================================================== |
153 | 171 |
154 #if !PROTOBUF_INLINE_NOT_IN_HEADERS | 172 #if !PROTOBUF_INLINE_NOT_IN_HEADERS |
155 // Any | 173 // Any |
156 | 174 |
157 // optional string type_url = 1; | 175 // string type_url = 1; |
158 inline void Any::clear_type_url() { | 176 inline void Any::clear_type_url() { |
159 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited()); | 177 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited()); |
160 } | 178 } |
161 inline const ::std::string& Any::type_url() const { | 179 inline const ::std::string& Any::type_url() const { |
162 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) | 180 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) |
163 return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); | 181 return type_url_.GetNoArena(); |
164 } | 182 } |
165 inline void Any::set_type_url(const ::std::string& value) { | 183 inline void Any::set_type_url(const ::std::string& value) { |
166 | 184 |
167 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), value); | 185 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), value); |
168 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) | 186 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) |
169 } | 187 } |
| 188 #if LANG_CXX11 |
| 189 inline void Any::set_type_url(::std::string&& value) { |
| 190 |
| 191 type_url_.SetNoArena( |
| 192 &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(va
lue)); |
| 193 // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url) |
| 194 } |
| 195 #endif |
170 inline void Any::set_type_url(const char* value) { | 196 inline void Any::set_type_url(const char* value) { |
171 | 197 |
172 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), ::std::string(value)); | 198 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), ::std::string(value)); |
173 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url) | 199 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url) |
174 } | 200 } |
175 inline void Any::set_type_url(const char* value, size_t size) { | 201 inline void Any::set_type_url(const char* value, size_t size) { |
176 | 202 |
177 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), | 203 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), |
178 ::std::string(reinterpret_cast<const char*>(value), size)); | 204 ::std::string(reinterpret_cast<const char*>(value), size)); |
179 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url) | 205 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url) |
(...skipping 11 matching lines...) Expand all Loading... |
191 inline void Any::set_allocated_type_url(::std::string* type_url) { | 217 inline void Any::set_allocated_type_url(::std::string* type_url) { |
192 if (type_url != NULL) { | 218 if (type_url != NULL) { |
193 | 219 |
194 } else { | 220 } else { |
195 | 221 |
196 } | 222 } |
197 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), type_url); | 223 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), type_url); |
198 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url) | 224 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url) |
199 } | 225 } |
200 | 226 |
201 // optional bytes value = 2; | 227 // bytes value = 2; |
202 inline void Any::clear_value() { | 228 inline void Any::clear_value() { |
203 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited()); | 229 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited()); |
204 } | 230 } |
205 inline const ::std::string& Any::value() const { | 231 inline const ::std::string& Any::value() const { |
206 // @@protoc_insertion_point(field_get:google.protobuf.Any.value) | 232 // @@protoc_insertion_point(field_get:google.protobuf.Any.value) |
207 return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyI
nited()); | 233 return value_.GetNoArena(); |
208 } | 234 } |
209 inline void Any::set_value(const ::std::string& value) { | 235 inline void Any::set_value(const ::std::string& value) { |
210 | 236 |
211 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, value); | 237 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, value); |
212 // @@protoc_insertion_point(field_set:google.protobuf.Any.value) | 238 // @@protoc_insertion_point(field_set:google.protobuf.Any.value) |
213 } | 239 } |
| 240 #if LANG_CXX11 |
| 241 inline void Any::set_value(::std::string&& value) { |
| 242 |
| 243 value_.SetNoArena( |
| 244 &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(va
lue)); |
| 245 // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value) |
| 246 } |
| 247 #endif |
214 inline void Any::set_value(const char* value) { | 248 inline void Any::set_value(const char* value) { |
215 | 249 |
216 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, ::std::string(value)); | 250 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, ::std::string(value)); |
217 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value) | 251 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value) |
218 } | 252 } |
219 inline void Any::set_value(const void* value, size_t size) { | 253 inline void Any::set_value(const void* value, size_t size) { |
220 | 254 |
221 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, | 255 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, |
222 ::std::string(reinterpret_cast<const char*>(value), size)); | 256 ::std::string(reinterpret_cast<const char*>(value), size)); |
223 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value) | 257 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value) |
(...skipping 15 matching lines...) Expand all Loading... |
239 | 273 |
240 } | 274 } |
241 value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited(), value); | 275 value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited(), value); |
242 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value) | 276 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value) |
243 } | 277 } |
244 | 278 |
245 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS | 279 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS |
246 | 280 |
247 // @@protoc_insertion_point(namespace_scope) | 281 // @@protoc_insertion_point(namespace_scope) |
248 | 282 |
| 283 |
249 } // namespace protobuf | 284 } // namespace protobuf |
250 } // namespace google | 285 } // namespace google |
251 | 286 |
252 // @@protoc_insertion_point(global_scope) | 287 // @@protoc_insertion_point(global_scope) |
253 | 288 |
254 #endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED | 289 #endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED |
OLD | NEW |