File indexing completed on 2025-01-18 10:13:18
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef UPB_REFLECTION_MESSAGE_H_
0009 #define UPB_REFLECTION_MESSAGE_H_
0010
0011 #include <stddef.h>
0012
0013 #include "upb/mem/arena.h"
0014 #include "upb/message/map.h"
0015 #include "upb/message/message.h"
0016 #include "upb/reflection/common.h"
0017
0018
0019 #include "upb/port/def.inc"
0020
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024
0025
0026
0027
0028 UPB_API upb_MutableMessageValue upb_Message_Mutable(upb_Message* msg,
0029 const upb_FieldDef* f,
0030 upb_Arena* a);
0031
0032
0033 UPB_API const upb_FieldDef* upb_Message_WhichOneofByDef(const upb_Message* msg,
0034 const upb_OneofDef* o);
0035
0036
0037 void upb_Message_ClearByDef(upb_Message* msg, const upb_MessageDef* m);
0038
0039
0040 UPB_API void upb_Message_ClearFieldByDef(upb_Message* msg,
0041 const upb_FieldDef* f);
0042
0043
0044 UPB_API bool upb_Message_HasFieldByDef(const upb_Message* msg,
0045 const upb_FieldDef* f);
0046
0047
0048 UPB_API upb_MessageValue upb_Message_GetFieldByDef(const upb_Message* msg,
0049 const upb_FieldDef* f);
0050
0051
0052
0053
0054
0055
0056 UPB_API bool upb_Message_SetFieldByDef(upb_Message* msg, const upb_FieldDef* f,
0057 upb_MessageValue val, upb_Arena* a);
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072 #define kUpb_Message_Begin -1
0073
0074 UPB_API bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m,
0075 const upb_DefPool* ext_pool,
0076 const upb_FieldDef** f, upb_MessageValue* val,
0077 size_t* iter);
0078
0079
0080 UPB_API bool upb_Message_DiscardUnknown(upb_Message* msg,
0081 const upb_MessageDef* m, int maxdepth);
0082
0083 #ifdef __cplusplus
0084 }
0085 #endif
0086
0087 #include "upb/port/undef.inc"
0088
0089 #endif