Lines Matching refs:fields
14 * `PB_MAX_REQUIRED_FIELDS`: Maximum number of proto2 `required` fields to check for presence. Defau…
15 * `PB_FIELD_32BIT`: Add support for field tag numbers over 65535, fields larger than 64 kiB and arr…
19 * `PB_WITHOUT_64BIT`: Disable support of 64-bit integer fields, for old compilers or for a slight s…
35 * `max_size`: Allocated maximum size for `bytes` and `string` fields. For strings, this includes th…
36 * `max_length`: Maximum length for `string` fields. Setting this is equivalent to setting `max_size…
37 * `max_count`: Allocated maximum number of entries in arrays (`repeated` fields).
42 * `no_unions`: Generate `oneof` fields as multiple optional fields instead of a C `union {}`.
43 * `anonymous_oneof`: Generate `oneof` fields as an anonymous union.
45 * `fixed_length`: Generate `bytes` fields with a constant length defined by `max_size`. A separate …
55 applying same options to multiple fields.
59 This keeps the options close to the fields they apply to, but can be
63 most common purpose is to define maximum size for string fields in order
95 fields
130 The .proto file format allows defining custom options for the fields.
165 bytes-type fields.
175 Type used for storing tag numbers and sizes of message fields. By
180 If tag numbers or fields larger than 65535 are needed, `PB_FIELD_32BIT`
211 of other fields:
248 |`field_count` | Total number of fields in the message.
252 |`field_callback` | Function used to handle all callback fields in this message. By default `pb_def…
288 | required_field_index | Index that counts only the required fields
291 | data_size | `sizeof()` of the field in the structure. For repeated fields this is for …
297 | submsg_desc | For submessage fields, points to the descriptor for the submessage.
313 are used to allocate variable length storage for bytes fields.
317 Part of a message structure, for fields with type PB_HTYPE_CALLBACK:
374 To implement custom processing of unknown fields, you can provide
376 as for normal callback fields, except that they get called for any
436 arrays, based on a list of fields in [X-macro](https://en.wikipedia.org/wiki/X_Macro) format. :
494 bool pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct);
499 | fields | Message descriptor, usually autogenerated.
500 | src_struct | Pointer to the message structure. Must match `fields` descriptor.
503 Normally pb_encode simply walks through the fields description array
506 write them to output. This causes some constraints for callback fields,
513 …bool pb_encode_ex(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct, unsign…
518 | fields | Message descriptor, usually autogenerated.
519 | src_struct | Pointer to the message structure. Must match `fields` descriptor.
532 bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct);
537 | fields | Message descriptor, usually autogenerated.
543 callback fields. The typical reason for using callbacks is to have an
551 payload of the field. For repeated fields, you can repeat this process
595 also for callback type fields.
610 format. Works for fields of type `bool`, `enum`, `int32`, `int64`, `uint32` and `uint64`:
626 Works for fields of type `sint32` and `sint64`:
635 Works for fields of type `bytes` and `string`:
649 Works for fields of type `fixed32`, `sfixed32` and `float`:
662 Works for fields of type `fixed64`, `sfixed64` and `double`:
676 message type that contains `double` fields.
689 fields of any message type.
691 …bool pb_encode_submessage(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct…
696 | fields | Pointer to the autogenerated message descriptor for the submessage type, e…
704 If the submessage contains callback fields, the callback function might
742 Read and decode all fields of a structure. Reads until EOF on input
745 bool pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct);
750 | fields | Message descriptor, usually autogenerated.
754 In Protocol Buffers binary format, end-of-file is only allowed between fields.
759 For optional fields, this function applies the default value and sets
763 for any pointer type fields. In this case, you have to call
771 …bool pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned in…
776 | fields | Message descriptor, usually autogenerated.
790 for any pointer type fields. In this case, you have to call
797 Releases any dynamically allocated fields:
799 void pb_release(const pb_msgdesc_t *fields, void *dest_struct);
803 | fields | Message descriptor, usually autogenerated.
807 will release any pointer type fields in the structure and set the
846 The functions with names `pb_decode_<datatype>` are used when dealing with callback fields.
856 For decoding strings and bytes fields, the length has already been decoded and the callback functio…
976 Begins iterating over the fields in a message type:
985 | returns | True on success, false if the message type has no fields.
1015 Internally this function avoids fully processing the descriptor for intermediate fields.
1028 The protobuf standard requires that `string` fields only contain valid
1029 UTF-8 encoded text, while `bytes` fields can contain arbitrary data.