File indexing completed on 2025-01-30 10:25:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef UPB_REFLECTION_DEF_POOL_H_
0011 #define UPB_REFLECTION_DEF_POOL_H_
0012
0013 #include "upb/base/status.h"
0014 #include "upb/base/string_view.h"
0015 #include "upb/reflection/common.h"
0016 #include "upb/reflection/def_type.h"
0017
0018
0019 #include "upb/port/def.inc"
0020
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024
0025 UPB_API void upb_DefPool_Free(upb_DefPool* s);
0026
0027 UPB_API upb_DefPool* upb_DefPool_New(void);
0028
0029 UPB_API const UPB_DESC(FeatureSetDefaults) *
0030 upb_DefPool_FeatureSetDefaults(const upb_DefPool* s);
0031
0032 UPB_API bool upb_DefPool_SetFeatureSetDefaults(upb_DefPool* s,
0033 const char* serialized_defaults,
0034 size_t serialized_len,
0035 upb_Status* status);
0036
0037 UPB_API const upb_MessageDef* upb_DefPool_FindMessageByName(
0038 const upb_DefPool* s, const char* sym);
0039
0040 const upb_MessageDef* upb_DefPool_FindMessageByNameWithSize(
0041 const upb_DefPool* s, const char* sym, size_t len);
0042
0043 UPB_API const upb_EnumDef* upb_DefPool_FindEnumByName(const upb_DefPool* s,
0044 const char* sym);
0045
0046 const upb_EnumValueDef* upb_DefPool_FindEnumByNameval(const upb_DefPool* s,
0047 const char* sym);
0048
0049 const upb_FileDef* upb_DefPool_FindFileByName(const upb_DefPool* s,
0050 const char* name);
0051
0052 const upb_FileDef* upb_DefPool_FindFileByNameWithSize(const upb_DefPool* s,
0053 const char* name,
0054 size_t len);
0055
0056 const upb_FieldDef* upb_DefPool_FindExtensionByMiniTable(
0057 const upb_DefPool* s, const upb_MiniTableExtension* ext);
0058
0059 UPB_API const upb_FieldDef* upb_DefPool_FindExtensionByName(const upb_DefPool* s,
0060 const char* sym);
0061
0062 const upb_FieldDef* upb_DefPool_FindExtensionByNameWithSize(
0063 const upb_DefPool* s, const char* name, size_t size);
0064
0065 const upb_FieldDef* upb_DefPool_FindExtensionByNumber(const upb_DefPool* s,
0066 const upb_MessageDef* m,
0067 int32_t fieldnum);
0068
0069 UPB_API const upb_ServiceDef* upb_DefPool_FindServiceByName(
0070 const upb_DefPool* s, const char* name);
0071
0072 const upb_ServiceDef* upb_DefPool_FindServiceByNameWithSize(
0073 const upb_DefPool* s, const char* name, size_t size);
0074
0075 const upb_FileDef* upb_DefPool_FindFileContainingSymbol(const upb_DefPool* s,
0076 const char* name);
0077
0078 UPB_API const upb_FileDef* upb_DefPool_AddFile(
0079 upb_DefPool* s, const UPB_DESC(FileDescriptorProto) * file_proto,
0080 upb_Status* status);
0081
0082 UPB_API const upb_ExtensionRegistry* upb_DefPool_ExtensionRegistry(
0083 const upb_DefPool* s);
0084
0085 const upb_FieldDef** upb_DefPool_GetAllExtensions(const upb_DefPool* s,
0086 const upb_MessageDef* m,
0087 size_t* count);
0088
0089 #ifdef __cplusplus
0090 }
0091 #endif
0092
0093 #include "upb/port/undef.inc"
0094
0095 #endif