WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
pb_common.h
Go to the documentation of this file.
1/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c.
2 * These functions are rarely needed by applications directly.
3 *
4 * Modified for WPILib Use
5 */
6
7#ifndef PB_COMMON_H_INCLUDED
8#define PB_COMMON_H_INCLUDED
9
10#include "pb.h"
11
12/* Initialize the field iterator structure to beginning.
13 * Returns false if the message type is empty. */
14bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message);
15
16/* Get a field iterator for extension field. */
18
19/* Same as pb_field_iter_begin(), but for const message pointer.
20 * Note that the pointers in pb_field_iter_t will be non-const but shouldn't
21 * be written to when using these functions. */
22bool pb_field_iter_begin_const(pb_field_iter_t *iter, const pb_msgdesc_t *desc, const void *message);
24
25/* Advance the iterator to the next field.
26 * Returns false when the iterator wraps back to the first field. */
28
29/* Advance the iterator until it points at a field with the given tag.
30 * Returns false if no such field exists. */
31bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag);
32
33/* Find a field with type PB_LTYPE_EXTENSION, or return false if not found.
34 * There can be only one extension range field per message. */
36
37#ifdef PB_VALIDATE_UTF8
38/* Validate UTF-8 text string */
39bool pb_validate_utf8(const char *s);
40#endif
41
42#endif
bool pb_field_iter_next(pb_field_iter_t *iter)
bool pb_field_iter_find_extension(pb_field_iter_t *iter)
bool pb_field_iter_begin_extension(pb_field_iter_t *iter, pb_extension_t *extension)
bool pb_field_iter_begin_extension_const(pb_field_iter_t *iter, const pb_extension_t *extension)
bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message)
bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag)
bool pb_field_iter_begin_const(pb_field_iter_t *iter, const pb_msgdesc_t *desc, const void *message)
Definition pb.h:468
Definition pb.h:347
Definition pb.h:331