Warning, file /include/upb/reflection/def_type.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef UPB_REFLECTION_DEF_TYPE_H_
0009 #define UPB_REFLECTION_DEF_TYPE_H_
0010
0011 #include "upb/hash/common.h"
0012
0013
0014 #include "upb/port/def.inc"
0015
0016
0017 typedef enum {
0018 UPB_DEFTYPE_MASK = 7,
0019
0020
0021 UPB_DEFTYPE_EXT = 0,
0022 UPB_DEFTYPE_MSG = 1,
0023 UPB_DEFTYPE_ENUM = 2,
0024 UPB_DEFTYPE_ENUMVAL = 3,
0025 UPB_DEFTYPE_SERVICE = 4,
0026
0027
0028 UPB_DEFTYPE_FIELD = 0,
0029 UPB_DEFTYPE_ONEOF = 1,
0030 } upb_deftype_t;
0031
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 UPB_INLINE void _upb_DefType_CheckPadding(size_t size) {
0045 UPB_ASSERT((size & UPB_DEFTYPE_MASK) == 0);
0046 }
0047
0048 upb_deftype_t _upb_DefType_Type(upb_value v);
0049
0050 upb_value _upb_DefType_Pack(const void* ptr, upb_deftype_t type);
0051
0052 const void* _upb_DefType_Unpack(upb_value v, upb_deftype_t type);
0053
0054 #ifdef __cplusplus
0055 }
0056 #endif
0057
0058 #include "upb/port/undef.inc"
0059
0060 #endif