38 #ifndef GOOGLE_PROTOBUF_UNKNOWN_FIELD_SET_H__ 39 #define GOOGLE_PROTOBUF_UNKNOWN_FIELD_SET_H__ 50 class CodedInputStream;
51 class CodedOutputStream;
52 class ZeroCopyInputStream;
56 class MessageSetFieldSkipperUsingCord;
84 void ClearAndFreeMemory();
87 inline bool empty()
const;
101 int SpaceUsedExcludingSelf()
const;
104 int SpaceUsed()
const;
107 inline int field_count()
const;
119 void AddFixed32(
int number,
uint32 value);
120 void AddFixed64(
int number,
uint64 value);
121 void AddLengthDelimited(
int number,
const string& value);
122 string* AddLengthDelimited(
int number);
130 void DeleteSubrange(
int start,
int num);
135 void DeleteByNumber(
int number);
143 bool ParseFromArray(
const void*
data,
int size);
145 return ParseFromArray(data.data(),
static_cast<int>(data.size()));
155 void ClearFallback();
163 std::vector<UnknownField>* fields_;
179 inline int number()
const;
187 inline uint64 varint()
const;
188 inline uint32 fixed32()
const;
189 inline uint64 fixed64()
const;
190 inline const string& length_delimited()
const;
196 inline void set_length_delimited(
const string&
value);
197 inline string* mutable_length_delimited();
207 inline int GetLengthDelimitedSize()
const;
226 union LengthDelimited {
236 mutable union LengthDelimited length_delimited_;
260 return fields_ ?
static_cast<int>(fields_->size()) : 0;
264 return (*fields_)[
index];
267 return &(*fields_)[
index];
272 AddLengthDelimited(number)->assign(value);
278 return static_cast<Type>(type_);
282 assert(
type() == TYPE_VARINT);
286 assert(
type() == TYPE_FIXED32);
290 assert(
type() == TYPE_FIXED64);
294 assert(
type() == TYPE_LENGTH_DELIMITED);
295 return *length_delimited_.string_value_;
298 assert(
type() == TYPE_GROUP);
303 assert(
type() == TYPE_VARINT);
307 assert(
type() == TYPE_FIXED32);
311 assert(
type() == TYPE_FIXED64);
315 assert(
type() == TYPE_LENGTH_DELIMITED);
316 length_delimited_.string_value_->assign(value);
319 assert(
type() == TYPE_LENGTH_DELIMITED);
320 return length_delimited_.string_value_;
323 assert(
type() == TYPE_GROUP);
329 return static_cast<int>(length_delimited_.string_value_->size());
332 inline void UnknownField::SetType(
Type type) {
340 #endif // GOOGLE_PROTOBUF_UNKNOWN_FIELD_SET_H__ GLboolean GLuint group
Definition: gl2ext.h:780
const UnknownFieldSet & group() const
Definition: unknown_field_set.h:297
void Reset()
Definition: metrics_default.cc:285
uint64 fixed64() const
Definition: unknown_field_set.h:289
void set_fixed64(uint64 value)
Definition: unknown_field_set.h:310
EGLStreamKHR EGLint EGLint EGLint size
Definition: eglext.h:984
::google::protobuf::internal::ArenaStringPtr string_value_
Definition: struct.pb.cc:35
const FieldDescriptor * field
Definition: parser_unittest.cc:2279
int field_count() const
Definition: unknown_field_set.h:259
Definition: unknown_field_set.h:171
Definition: unknown_field_set.h:174
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
Definition: macros.h:40
bool empty() const
Definition: unknown_field_set.h:250
uint64 varint() const
Definition: unknown_field_set.h:281
Definition: unknown_field_set.h:173
bool ParseFromString(const string &data)
Definition: unknown_field_set.h:144
#define GOOGLE_DCHECK_EQ
Definition: logging.h:194
PyObject * DeepCopy(CMessage *self, PyObject *arg)
Definition: message.cc:2448
EGLContext EGLenum target
Definition: eglext.h:192
Type
Definition: unknown_field_set.h:170
uint8_t uint8
Definition: port.h:133
UnknownField * mutable_field(int index)
Definition: unknown_field_set.h:266
UnknownFieldSet * group_
Definition: unknown_field_set.h:237
void Clear()
Definition: unknown_field_set.h:244
Message
Definition: peerconnection_unittest.cc:105
string * mutable_length_delimited()
Definition: unknown_field_set.h:318
void AddLengthDelimited(int number, const string &value)
Definition: unknown_field_set.h:270
Type type() const
Definition: unknown_field_set.h:277
uint32 fixed32_
Definition: unknown_field_set.h:234
GLuint start
Definition: gl2ext.h:323
const string & length_delimited() const
Definition: unknown_field_set.h:293
const FieldDescriptor const OneofDescriptor value
Definition: descriptor.h:1717
UnknownFieldSet * mutable_group()
Definition: unknown_field_set.h:322
EGLSurface EGLint x
Definition: eglext.h:950
GLuint index
Definition: gl2.h:383
EGLAttrib * value
Definition: eglext.h:120
void set_length_delimited(const string &value)
Definition: unknown_field_set.h:314
int number() const
Definition: unknown_field_set.h:276
Definition: unknown_field_set.h:168
uint32_t uint32
Definition: port.h:135
Definition: __init__.py:1
uint64_t uint64
Definition: port.h:136
Definition: unknown_field_set.h:75
EGLenum type
Definition: eglext.h:63
EGLStreamKHR EGLint EGLint EGLint const void * data
Definition: eglext.h:984
Definition: document.h:393
void set_fixed32(uint32 value)
Definition: unknown_field_set.h:306
#define GOOGLE_DCHECK
Definition: logging.h:192
const UnknownField & field(int index) const
Definition: unknown_field_set.h:262
void set_varint(uint64 value)
Definition: unknown_field_set.h:302
#define NULL
Definition: common_types.h:41
int GetLengthDelimitedSize() const
Definition: unknown_field_set.h:327
#define LIBPROTOBUF_EXPORT
Definition: port.h:97
uint64 fixed64_
Definition: unknown_field_set.h:235
uint32 fixed32() const
Definition: unknown_field_set.h:285
Definition: gflags_completions.h:115
string input
Definition: tokenizer_unittest.cc:198
FieldDescriptorProto * AddField(DescriptorProto *parent, const string &name, int number, FieldDescriptorProto::Label label, FieldDescriptorProto::Type type)
Definition: descriptor_unittest.cc:101
Definition: unknown_field_set.h:172
Definition: coded_stream.h:665
void swap(optional< T > &x, optional< T > &y) __NOEXCEPT_(__NOEXCEPT_(x.swap(y)))
Definition: Optional.h:1047
void Swap(UnknownFieldSet *x)
Definition: unknown_field_set.h:255
uint64 varint_
Definition: unknown_field_set.h:233
MergeFrom
Definition: python_message.py:1259