WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
field_def.h
Go to the documentation of this file.
1// Protocol Buffers - Google's data interchange format
2// Copyright 2023 Google LLC. All rights reserved.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file or at
6// https://developers.google.com/open-source/licenses/bsd
7
8// IWYU pragma: private, include "upb/reflection/def.h"
9
10#ifndef UPB_REFLECTION_FIELD_DEF_H_
11#define UPB_REFLECTION_FIELD_DEF_H_
12
13#include <stdint.h>
14
17#include "upb/message/value.h"
21
22// Must be last.
23#include "upb/port/def.inc"
24
25// Maximum field number allowed for FieldDefs.
26// This is an inherent limit of the protobuf wire format.
27#define kUpb_MaxFieldNumber ((1 << 29) - 1)
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
35 const upb_FieldDef* f);
41const char* upb_FieldDef_FullName(const upb_FieldDef* f);
65
66// Creates a mini descriptor string for a field, returns true on success.
68 upb_StringView* out);
69
72 const upb_FieldDef* f);
75const UPB_DESC(FieldOptions) * upb_FieldDef_Options(const upb_FieldDef* f);
76const UPB_DESC(FeatureSet) *
77 upb_FieldDef_ResolvedFeatures(const upb_FieldDef* f);
79 const upb_FieldDef* f);
81
82#ifdef __cplusplus
83} /* extern "C" */
84#endif
85
86#include "upb/port/undef.inc"
87
88#endif /* UPB_REFLECTION_FIELD_DEF_H_ */
#define UPB_DESC(sym)
Definition def.inc:496
#define UPB_API
Definition def.inc:162
upb_CType
Definition descriptor_constants.h:18
upb_FieldType
Definition descriptor_constants.h:40
upb_Label
Definition descriptor_constants.h:33
UPB_API bool upb_FieldDef_IsRepeated(const upb_FieldDef *f)
UPB_API bool upb_FieldDef_IsPacked(const upb_FieldDef *f)
const upb_MiniTableField * upb_FieldDef_MiniTable(const upb_FieldDef *f)
bool upb_FieldDef_HasJsonName(const upb_FieldDef *f)
UPB_API const upb_EnumDef * upb_FieldDef_EnumSubDef(const upb_FieldDef *f)
UPB_API const upb_OneofDef * upb_FieldDef_RealContainingOneof(const upb_FieldDef *f)
const upb_MiniTableExtension * upb_FieldDef_MiniTableExtension(const upb_FieldDef *f)
bool upb_FieldDef_MiniDescriptorEncode(const upb_FieldDef *f, upb_Arena *a, upb_StringView *out)
bool upb_FieldDef_HasOptions(const upb_FieldDef *f)
bool _upb_FieldDef_IsGroupLike(const upb_FieldDef *f)
const upb_MessageDef * upb_FieldDef_ExtensionScope(const upb_FieldDef *f)
UPB_API upb_FieldType upb_FieldDef_Type(const upb_FieldDef *f)
UPB_API uint32_t upb_FieldDef_Number(const upb_FieldDef *f)
UPB_API bool upb_FieldDef_IsEnum(const upb_FieldDef *f)
bool upb_FieldDef_IsOptional(const upb_FieldDef *f)
UPB_API bool upb_FieldDef_IsSubMessage(const upb_FieldDef *f)
UPB_API bool upb_FieldDef_IsRequired(const upb_FieldDef *f)
bool _upb_FieldDef_ValidateUtf8(const upb_FieldDef *f)
uint32_t upb_FieldDef_Index(const upb_FieldDef *f)
UPB_API const upb_FileDef * upb_FieldDef_File(const upb_FieldDef *f)
UPB_API bool upb_FieldDef_IsMap(const upb_FieldDef *f)
const char * upb_FieldDef_FullName(const upb_FieldDef *f)
bool upb_FieldDef_IsExtension(const upb_FieldDef *f)
bool upb_FieldDef_IsPrimitive(const upb_FieldDef *f)
UPB_API bool upb_FieldDef_HasPresence(const upb_FieldDef *f)
UPB_API const char * upb_FieldDef_JsonName(const upb_FieldDef *f)
bool upb_FieldDef_IsString(const upb_FieldDef *f)
bool upb_FieldDef_HasDefault(const upb_FieldDef *f)
UPB_API const upb_MessageDef * upb_FieldDef_ContainingType(const upb_FieldDef *f)
UPB_API upb_CType upb_FieldDef_CType(const upb_FieldDef *f)
UPB_API const char * upb_FieldDef_Name(const upb_FieldDef *f)
UPB_API const upb_MessageDef * upb_FieldDef_MessageSubDef(const upb_FieldDef *f)
UPB_API upb_Label upb_FieldDef_Label(const upb_FieldDef *f)
UPB_API upb_MessageValue upb_FieldDef_Default(const upb_FieldDef *f)
uint32_t upb_FieldDef_LayoutIndex(const upb_FieldDef *f)
bool _upb_FieldDef_IsPackable(const upb_FieldDef *f)
const upb_OneofDef * upb_FieldDef_ContainingOneof(const upb_FieldDef *f)
bool upb_FieldDef_HasSubDef(const upb_FieldDef *f)
struct upb_FieldDef upb_FieldDef
Definition common.h:29
struct upb_FileDef upb_FileDef
Definition common.h:30
struct upb_EnumDef upb_EnumDef
Definition common.h:25
struct upb_OneofDef upb_OneofDef
Definition common.h:34
struct upb_MessageDef upb_MessageDef
Definition common.h:31
Definition arena.h:29
Definition extension.h:21
Definition field.h:21
Definition string_view.h:23
Definition value.h:27