webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
any.pb.h
Go to the documentation of this file.
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 
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>
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.
40 
41 class Any;
42 
43 // ===================================================================
44 
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 
58  static const Any& default_instance();
59 
60  // implements Any -----------------------------------------------
61 
63  void PackFrom(const ::google::protobuf::Message& message,
64  const ::std::string& type_url_prefix);
65  bool UnpackTo(::google::protobuf::Message* message) const;
66  template<typename T> bool Is() const {
67  return _any_metadata_.Is<T>();
68  }
69 
70  void Swap(Any* other);
71 
72  // implements Message ----------------------------------------------
73 
74  inline Any* New() const { return New(NULL); }
75 
76  Any* New(::google::protobuf::Arena* arena) const;
77  void CopyFrom(const ::google::protobuf::Message& from);
79  void CopyFrom(const Any& from);
80  void MergeFrom(const Any& from);
81  void Clear();
82  bool IsInitialized() const;
83 
84  int ByteSize() const;
85  bool MergePartialFromCodedStream(
87  void SerializeWithCachedSizes(
89  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
90  int GetCachedSize() const { return _cached_size_; }
91  private:
92  void SharedCtor();
93  void SharedDtor();
94  void SetCachedSize(int size) const;
95  void InternalSwap(Any* other);
96  private:
97  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
98  return _internal_metadata_.arena();
99  }
100  inline void* MaybeArenaPtr() const {
101  return _internal_metadata_.raw_arena_ptr();
102  }
103  public:
104 
105  ::google::protobuf::Metadata GetMetadata() const;
106 
107  // nested types ----------------------------------------------------
108 
109  // accessors -------------------------------------------------------
110 
111  // optional string type_url = 1;
112  void clear_type_url();
113  static const int kTypeUrlFieldNumber = 1;
114  const ::std::string& type_url() const;
115  void set_type_url(const ::std::string& value);
116  void set_type_url(const char* value);
117  void set_type_url(const char* value, size_t size);
118  ::std::string* mutable_type_url();
119  ::std::string* release_type_url();
120  void set_allocated_type_url(::std::string* type_url);
121 
122  // optional bytes value = 2;
123  void clear_value();
124  static const int kValueFieldNumber = 2;
125  const ::std::string& value() const;
126  void set_value(const ::std::string& value);
127  void set_value(const char* value);
128  void set_value(const void* value, size_t size);
129  ::std::string* mutable_value();
130  ::std::string* release_value();
131  void set_allocated_value(::std::string* value);
132 
133  // @@protoc_insertion_point(class_scope:google.protobuf.Any)
134  private:
135 
137  bool _is_default_instance_;
140  mutable int _cached_size_;
145 
146  void InitAsDefaultInstance();
147  static Any* default_instance_;
148 };
149 // ===================================================================
150 
151 
152 // ===================================================================
153 
154 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
155 // Any
156 
157 // optional string type_url = 1;
158 inline void Any::clear_type_url() {
159  type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
160 }
162  // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
163  return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
164 }
166 
167  type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
168  // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
169 }
170 inline void Any::set_type_url(const char* value) {
171 
172  type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
173  // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
174 }
175 inline void Any::set_type_url(const char* value, size_t size) {
176 
178  ::std::string(reinterpret_cast<const char*>(value), size));
179  // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
180 }
182 
183  // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
184  return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
185 }
187  // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
188 
189  return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
190 }
192  if (type_url != NULL) {
193 
194  } else {
195 
196  }
197  type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
198  // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
199 }
200 
201 // optional bytes value = 2;
202 inline void Any::clear_value() {
203  value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
204 }
206  // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
207  return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
208 }
210 
211  value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
212  // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
213 }
214 inline void Any::set_value(const char* value) {
215 
217  // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
218 }
219 inline void Any::set_value(const void* value, size_t size) {
220 
222  ::std::string(reinterpret_cast<const char*>(value), size));
223  // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
224 }
226 
227  // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
228  return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
229 }
231  // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
232 
233  return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
234 }
236  if (value != NULL) {
237 
238  } else {
239 
240  }
241  value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
242  // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
243 }
244 
245 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
246 
247 // @@protoc_insertion_point(namespace_scope)
248 
249 } // namespace protobuf
250 } // namespace google
251 
252 // @@protoc_insertion_point(global_scope)
253 
254 #endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
Any & operator=(const Any &from)
Definition: any.pb.h:52
Definition: message.h:179
EGLStreamKHR EGLint EGLint EGLint size
Definition: eglext.h:984
::std::string * release_value()
Definition: any.pb.h:230
void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto()
Definition: any.pb.cc:72
string * type_url
Definition: conformance_cpp.cc:61
struct Descriptor Descriptor
Definition: protobuf.h:23
const ::std::string & type_url() const
Definition: any.pb.h:161
const Descriptor * descriptor
Definition: descriptor.cc:271
bool Is() const
Definition: any.pb.h:66
uint8_t uint8
Definition: port.h:133
::std::string * mutable_value()
Definition: any.pb.h:225
LIBPROTOBUF_EXPORTconst ::std::string & GetEmptyStringAlreadyInited()
Definition: generated_message_util.h:85
Definition: arenastring.h:56
Message
Definition: peerconnection_unittest.cc:105
void set_value(const ::std::string &value)
Definition: any.pb.h:209
Any * New() const
Definition: any.pb.h:74
const ::std::string & value() const
Definition: any.pb.h:205
Definition: message.h:164
#define output
Definition: wire_format_lite.h:418
void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto()
Definition: any.pb.cc:32
const FieldDescriptor const OneofDescriptor value
Definition: descriptor.h:1717
Definition: any.pb.h:45
TestSubObjConstructor T
Definition: TestTypedefs.idl:84
IsInitialized
Definition: python_message.py:1169
void set_allocated_type_url(::std::string *type_url)
Definition: any.pb.h:191
::std::string * release_type_url()
Definition: any.pb.h:186
EGLAttrib * value
Definition: eglext.h:120
void clear_value()
Definition: any.pb.h:202
void set_type_url(const ::std::string &value)
Definition: any.pb.h:165
void clear_type_url()
Definition: any.pb.h:158
Definition: __init__.py:1
Definition: arena.h:218
GLsizei const GLchar *const * string
Definition: gl2.h:479
::std::string * mutable_type_url()
Definition: any.pb.h:181
#define NULL
Definition: common_types.h:41
void set_allocated_value(::std::string *value)
Definition: any.pb.h:235
#define LIBPROTOBUF_EXPORT
Definition: port.h:97
Definition: gflags_completions.h:115
int GetCachedSize() const
Definition: any.pb.h:90
string input
Definition: tokenizer_unittest.cc:198
ByteSize
Definition: python_message.py:1040
Definition: coded_stream.h:665
Definition: coded_stream.h:159
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137
MergeFrom
Definition: python_message.py:1259
void protobuf_AddDesc_google_2fprotobuf_2fany_2eproto()
Definition: any.pb.cc:77