Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: third_party/protobuf/src/google/protobuf/any.pb.h

Issue 1291903002: Pull new version of protobuf sources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/any.proto
3
4 #ifndef PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
5 #define PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
6
7 #include <string>
8
9 #include <google/protobuf/stubs/common.h>
10
11 #if GOOGLE_PROTOBUF_VERSION < 3000000
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 3000000 < 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/arena.h>
23 #include <google/protobuf/arenastring.h>
24 #include <google/protobuf/generated_message_util.h>
25 #include <google/protobuf/metadata.h>
26 #include <google/protobuf/message.h>
27 #include <google/protobuf/repeated_field.h>
28 #include <google/protobuf/extension_set.h>
29 #include <google/protobuf/unknown_field_set.h>
30 #include "google/protobuf/any.h"
31 // @@protoc_insertion_point(includes)
32
33 namespace google {
34 namespace protobuf {
35
36 // Internal implementation detail -- do not call these.
37 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
38 void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
39 void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
40
41 class Any;
42
43 // ===================================================================
44
45 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message {
46 public:
47 Any();
48 virtual ~Any();
49
50 Any(const Any& from);
51
52 inline Any& operator=(const Any& from) {
53 CopyFrom(from);
54 return *this;
55 }
56
57 static const ::google::protobuf::Descriptor* descriptor();
58 static const Any& default_instance();
59
60 // implements Any -----------------------------------------------
61
62 void PackFrom(const ::google::protobuf::Message& message);
63 bool UnpackTo(::google::protobuf::Message* message) const;
64 template<typename T> bool Is() const {
65 return _any_metadata_.Is<T>();
66 }
67
68 void Swap(Any* other);
69
70 // implements Message ----------------------------------------------
71
72 inline Any* New() const { return New(NULL); }
73
74 Any* New(::google::protobuf::Arena* arena) const;
75 void CopyFrom(const ::google::protobuf::Message& from);
76 void MergeFrom(const ::google::protobuf::Message& from);
77 void CopyFrom(const Any& from);
78 void MergeFrom(const Any& from);
79 void Clear();
80 bool IsInitialized() const;
81
82 int ByteSize() const;
83 bool MergePartialFromCodedStream(
84 ::google::protobuf::io::CodedInputStream* input);
85 void SerializeWithCachedSizes(
86 ::google::protobuf::io::CodedOutputStream* output) const;
87 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf: :uint8* output) const;
88 int GetCachedSize() const { return _cached_size_; }
89 private:
90 void SharedCtor();
91 void SharedDtor();
92 void SetCachedSize(int size) const;
93 void InternalSwap(Any* other);
94 private:
95 inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
96 return _internal_metadata_.arena();
97 }
98 inline void* MaybeArenaPtr() const {
99 return _internal_metadata_.raw_arena_ptr();
100 }
101 public:
102
103 ::google::protobuf::Metadata GetMetadata() const;
104
105 // nested types ----------------------------------------------------
106
107 // accessors -------------------------------------------------------
108
109 // optional string type_url = 1;
110 void clear_type_url();
111 static const int kTypeUrlFieldNumber = 1;
112 const ::std::string& type_url() const;
113 void set_type_url(const ::std::string& value);
114 void set_type_url(const char* value);
115 void set_type_url(const char* value, size_t size);
116 ::std::string* mutable_type_url();
117 ::std::string* release_type_url();
118 void set_allocated_type_url(::std::string* type_url);
119
120 // optional bytes value = 2;
121 void clear_value();
122 static const int kValueFieldNumber = 2;
123 const ::std::string& value() const;
124 void set_value(const ::std::string& value);
125 void set_value(const char* value);
126 void set_value(const void* value, size_t size);
127 ::std::string* mutable_value();
128 ::std::string* release_value();
129 void set_allocated_value(::std::string* value);
130
131 // @@protoc_insertion_point(class_scope:google.protobuf.Any)
132 private:
133
134 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
135 bool _is_default_instance_;
136 ::google::protobuf::internal::ArenaStringPtr type_url_;
137 ::google::protobuf::internal::ArenaStringPtr value_;
138 mutable int _cached_size_;
139 ::google::protobuf::internal::AnyMetadata _any_metadata_;
140 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eprot o();
141 friend void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
142 friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
143
144 void InitAsDefaultInstance();
145 static Any* default_instance_;
146 };
147 // ===================================================================
148
149
150 // ===================================================================
151
152 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
153 // Any
154
155 // optional string type_url = 1;
156 inline void Any::clear_type_url() {
157 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlr eadyInited());
158 }
159 inline const ::std::string& Any::type_url() const {
160 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
161 return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlrea dyInited());
162 }
163 inline void Any::set_type_url(const ::std::string& value) {
164
165 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite d(), value);
166 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
167 }
168 inline void Any::set_type_url(const char* value) {
169
170 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite d(), ::std::string(value));
171 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
172 }
173 inline void Any::set_type_url(const char* value, size_t size) {
174
175 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite d(),
176 ::std::string(reinterpret_cast<const char*>(value), size));
177 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
178 }
179 inline ::std::string* Any::mutable_type_url() {
180
181 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
182 return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringA lreadyInited());
183 }
184 inline ::std::string* Any::release_type_url() {
185
186 return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringA lreadyInited());
187 }
188 inline void Any::set_allocated_type_url(::std::string* type_url) {
189 if (type_url != NULL) {
190
191 } else {
192
193 }
194 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlr eadyInited(), type_url);
195 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
196 }
197
198 // optional bytes value = 2;
199 inline void Any::clear_value() {
200 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlread yInited());
201 }
202 inline const ::std::string& Any::value() const {
203 // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
204 return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyI nited());
205 }
206 inline void Any::set_value(const ::std::string& value) {
207
208 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited() , value);
209 // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
210 }
211 inline void Any::set_value(const char* value) {
212
213 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited() , ::std::string(value));
214 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
215 }
216 inline void Any::set_value(const void* value, size_t size) {
217
218 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited() ,
219 ::std::string(reinterpret_cast<const char*>(value), size));
220 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
221 }
222 inline ::std::string* Any::mutable_value() {
223
224 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
225 return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlre adyInited());
226 }
227 inline ::std::string* Any::release_value() {
228
229 return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlre adyInited());
230 }
231 inline void Any::set_allocated_value(::std::string* value) {
232 if (value != NULL) {
233
234 } else {
235
236 }
237 value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlread yInited(), value);
238 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
239 }
240
241 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
242
243 // @@protoc_insertion_point(namespace_scope)
244
245 } // namespace protobuf
246 } // namespace google
247
248 // @@protoc_insertion_point(global_scope)
249
250 #endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698