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 < 3001000 | 11 #if GOOGLE_PROTOBUF_VERSION < 3000000 |
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 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION | 16 #if 3000000 < 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> // IWYU pragma: export | 27 #include <google/protobuf/repeated_field.h> |
28 #include <google/protobuf/extension_set.h> // IWYU pragma: export | 28 #include <google/protobuf/extension_set.h> |
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 | |
39 | 32 |
40 namespace google { | 33 namespace google { |
41 namespace protobuf { | 34 namespace protobuf { |
42 | 35 |
43 // Internal implementation detail -- do not call these. | 36 // Internal implementation detail -- do not call these. |
44 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto(); | 37 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto(); |
45 void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fany_2eproto(); | 38 void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto(); |
| 39 void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); |
| 40 |
| 41 class Any; |
46 | 42 |
47 // =================================================================== | 43 // =================================================================== |
48 | 44 |
49 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in
sertion_point(class_definition:google.protobuf.Any) */ { | 45 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message { |
50 public: | 46 public: |
51 Any(); | 47 Any(); |
52 virtual ~Any(); | 48 virtual ~Any(); |
53 | 49 |
54 Any(const Any& from); | 50 Any(const Any& from); |
55 | 51 |
56 inline Any& operator=(const Any& from) { | 52 inline Any& operator=(const Any& from) { |
57 CopyFrom(from); | 53 CopyFrom(from); |
58 return *this; | 54 return *this; |
59 } | 55 } |
60 | 56 |
61 static const ::google::protobuf::Descriptor* descriptor(); | 57 static const ::google::protobuf::Descriptor* descriptor(); |
62 static const Any& default_instance(); | 58 static const Any& default_instance(); |
63 | 59 |
64 static inline const Any* internal_default_instance() { | |
65 return reinterpret_cast<const Any*>( | |
66 &_Any_default_instance_); | |
67 } | |
68 | |
69 // implements Any ----------------------------------------------- | 60 // implements Any ----------------------------------------------- |
70 | 61 |
71 void PackFrom(const ::google::protobuf::Message& message); | 62 void PackFrom(const ::google::protobuf::Message& message); |
72 void PackFrom(const ::google::protobuf::Message& message, | 63 void PackFrom(const ::google::protobuf::Message& message, |
73 const ::std::string& type_url_prefix); | 64 const ::std::string& type_url_prefix); |
74 bool UnpackTo(::google::protobuf::Message* message) const; | 65 bool UnpackTo(::google::protobuf::Message* message) const; |
75 template<typename T> bool Is() const { | 66 template<typename T> bool Is() const { |
76 return _any_metadata_.Is<T>(); | 67 return _any_metadata_.Is<T>(); |
77 } | 68 } |
78 | 69 |
79 void Swap(Any* other); | 70 void Swap(Any* other); |
80 | 71 |
81 // implements Message ---------------------------------------------- | 72 // implements Message ---------------------------------------------- |
82 | 73 |
83 inline Any* New() const PROTOBUF_FINAL { return New(NULL); } | 74 inline Any* New() const { return New(NULL); } |
84 | 75 |
85 Any* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; | 76 Any* New(::google::protobuf::Arena* arena) const; |
86 void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; | 77 void CopyFrom(const ::google::protobuf::Message& from); |
87 void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; | 78 void MergeFrom(const ::google::protobuf::Message& from); |
88 void CopyFrom(const Any& from); | 79 void CopyFrom(const Any& from); |
89 void MergeFrom(const Any& from); | 80 void MergeFrom(const Any& from); |
90 void Clear() PROTOBUF_FINAL; | 81 void Clear(); |
91 bool IsInitialized() const PROTOBUF_FINAL; | 82 bool IsInitialized() const; |
92 | 83 |
93 size_t ByteSizeLong() const PROTOBUF_FINAL; | 84 int ByteSize() const; |
94 bool MergePartialFromCodedStream( | 85 bool MergePartialFromCodedStream( |
95 ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; | 86 ::google::protobuf::io::CodedInputStream* input); |
96 void SerializeWithCachedSizes( | 87 void SerializeWithCachedSizes( |
97 ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; | 88 ::google::protobuf::io::CodedOutputStream* output) const; |
98 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( | 89 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf:
:uint8* output) const; |
99 bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINA
L; | 90 int GetCachedSize() const { return _cached_size_; } |
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_; } | |
105 private: | 91 private: |
106 void SharedCtor(); | 92 void SharedCtor(); |
107 void SharedDtor(); | 93 void SharedDtor(); |
108 void SetCachedSize(int size) const PROTOBUF_FINAL; | 94 void SetCachedSize(int size) const; |
109 void InternalSwap(Any* other); | 95 void InternalSwap(Any* other); |
110 private: | 96 private: |
111 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { | 97 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { |
112 return NULL; | 98 return _internal_metadata_.arena(); |
113 } | 99 } |
114 inline void* MaybeArenaPtr() const { | 100 inline void* MaybeArenaPtr() const { |
115 return NULL; | 101 return _internal_metadata_.raw_arena_ptr(); |
116 } | 102 } |
117 public: | 103 public: |
118 | 104 |
119 ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; | 105 ::google::protobuf::Metadata GetMetadata() const; |
120 | 106 |
121 // nested types ---------------------------------------------------- | 107 // nested types ---------------------------------------------------- |
122 | 108 |
123 // accessors ------------------------------------------------------- | 109 // accessors ------------------------------------------------------- |
124 | 110 |
125 // string type_url = 1; | 111 // optional string type_url = 1; |
126 void clear_type_url(); | 112 void clear_type_url(); |
127 static const int kTypeUrlFieldNumber = 1; | 113 static const int kTypeUrlFieldNumber = 1; |
128 const ::std::string& type_url() const; | 114 const ::std::string& type_url() const; |
129 void set_type_url(const ::std::string& value); | 115 void set_type_url(const ::std::string& value); |
130 void set_type_url(const char* value); | 116 void set_type_url(const char* value); |
131 void set_type_url(const char* value, size_t size); | 117 void set_type_url(const char* value, size_t size); |
132 ::std::string* mutable_type_url(); | 118 ::std::string* mutable_type_url(); |
133 ::std::string* release_type_url(); | 119 ::std::string* release_type_url(); |
134 void set_allocated_type_url(::std::string* type_url); | 120 void set_allocated_type_url(::std::string* type_url); |
135 | 121 |
136 // bytes value = 2; | 122 // optional bytes value = 2; |
137 void clear_value(); | 123 void clear_value(); |
138 static const int kValueFieldNumber = 2; | 124 static const int kValueFieldNumber = 2; |
139 const ::std::string& value() const; | 125 const ::std::string& value() const; |
140 void set_value(const ::std::string& value); | 126 void set_value(const ::std::string& value); |
141 void set_value(const char* value); | 127 void set_value(const char* value); |
142 void set_value(const void* value, size_t size); | 128 void set_value(const void* value, size_t size); |
143 ::std::string* mutable_value(); | 129 ::std::string* mutable_value(); |
144 ::std::string* release_value(); | 130 ::std::string* release_value(); |
145 void set_allocated_value(::std::string* value); | 131 void set_allocated_value(::std::string* value); |
146 | 132 |
147 // @@protoc_insertion_point(class_scope:google.protobuf.Any) | 133 // @@protoc_insertion_point(class_scope:google.protobuf.Any) |
148 private: | 134 private: |
149 | 135 |
150 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; | 136 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; |
| 137 bool _is_default_instance_; |
151 ::google::protobuf::internal::ArenaStringPtr type_url_; | 138 ::google::protobuf::internal::ArenaStringPtr type_url_; |
152 ::google::protobuf::internal::ArenaStringPtr value_; | 139 ::google::protobuf::internal::ArenaStringPtr value_; |
153 mutable int _cached_size_; | 140 mutable int _cached_size_; |
154 ::google::protobuf::internal::AnyMetadata _any_metadata_; | 141 ::google::protobuf::internal::AnyMetadata _any_metadata_; |
155 friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fany_2
eproto_impl(); | 142 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eprot
o(); |
156 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eprot
o_impl(); | 143 friend void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto(); |
157 friend const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2f
any_2eproto(); | |
158 friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); | 144 friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto(); |
159 | 145 |
| 146 void InitAsDefaultInstance(); |
| 147 static Any* default_instance_; |
160 }; | 148 }; |
161 // =================================================================== | 149 // =================================================================== |
162 | 150 |
163 | 151 |
164 // =================================================================== | 152 // =================================================================== |
165 | 153 |
166 #if !PROTOBUF_INLINE_NOT_IN_HEADERS | 154 #if !PROTOBUF_INLINE_NOT_IN_HEADERS |
167 // Any | 155 // Any |
168 | 156 |
169 // string type_url = 1; | 157 // optional string type_url = 1; |
170 inline void Any::clear_type_url() { | 158 inline void Any::clear_type_url() { |
171 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited()); | 159 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited()); |
172 } | 160 } |
173 inline const ::std::string& Any::type_url() const { | 161 inline const ::std::string& Any::type_url() const { |
174 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) | 162 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) |
175 return type_url_.GetNoArena(); | 163 return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
176 } | 164 } |
177 inline void Any::set_type_url(const ::std::string& value) { | 165 inline void Any::set_type_url(const ::std::string& value) { |
178 | 166 |
179 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), value); | 167 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), value); |
180 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) | 168 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) |
181 } | 169 } |
182 inline void Any::set_type_url(const char* value) { | 170 inline void Any::set_type_url(const char* value) { |
183 | 171 |
184 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), ::std::string(value)); | 172 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), ::std::string(value)); |
185 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url) | 173 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url) |
(...skipping 17 matching lines...) Expand all Loading... |
203 inline void Any::set_allocated_type_url(::std::string* type_url) { | 191 inline void Any::set_allocated_type_url(::std::string* type_url) { |
204 if (type_url != NULL) { | 192 if (type_url != NULL) { |
205 | 193 |
206 } else { | 194 } else { |
207 | 195 |
208 } | 196 } |
209 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), type_url); | 197 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), type_url); |
210 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url) | 198 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url) |
211 } | 199 } |
212 | 200 |
213 // bytes value = 2; | 201 // optional bytes value = 2; |
214 inline void Any::clear_value() { | 202 inline void Any::clear_value() { |
215 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited()); | 203 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited()); |
216 } | 204 } |
217 inline const ::std::string& Any::value() const { | 205 inline const ::std::string& Any::value() const { |
218 // @@protoc_insertion_point(field_get:google.protobuf.Any.value) | 206 // @@protoc_insertion_point(field_get:google.protobuf.Any.value) |
219 return value_.GetNoArena(); | 207 return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyI
nited()); |
220 } | 208 } |
221 inline void Any::set_value(const ::std::string& value) { | 209 inline void Any::set_value(const ::std::string& value) { |
222 | 210 |
223 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, value); | 211 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, value); |
224 // @@protoc_insertion_point(field_set:google.protobuf.Any.value) | 212 // @@protoc_insertion_point(field_set:google.protobuf.Any.value) |
225 } | 213 } |
226 inline void Any::set_value(const char* value) { | 214 inline void Any::set_value(const char* value) { |
227 | 215 |
228 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, ::std::string(value)); | 216 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, ::std::string(value)); |
229 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value) | 217 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value) |
(...skipping 21 matching lines...) Expand all Loading... |
251 | 239 |
252 } | 240 } |
253 value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited(), value); | 241 value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlread
yInited(), value); |
254 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value) | 242 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value) |
255 } | 243 } |
256 | 244 |
257 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS | 245 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS |
258 | 246 |
259 // @@protoc_insertion_point(namespace_scope) | 247 // @@protoc_insertion_point(namespace_scope) |
260 | 248 |
261 | |
262 } // namespace protobuf | 249 } // namespace protobuf |
263 } // namespace google | 250 } // namespace google |
264 | 251 |
265 // @@protoc_insertion_point(global_scope) | 252 // @@protoc_insertion_point(global_scope) |
266 | 253 |
267 #endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED | 254 #endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED |
OLD | NEW |