WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
common.h File Reference
#include <stdint.h>
#include <string.h>
#include "upb/base/string_view.h"
#include "upb/port/def.inc"
#include "upb/port/undef.inc"

Go to the source code of this file.

Classes

struct  upb_value
 
struct  upb_SizePrefixString
 
union  upb_key
 
struct  _upb_tabent
 
struct  upb_table
 

Macros

#define FUNCS(name, membername, type_t, converter)
 

Typedefs

typedef struct _upb_tabent upb_tabent
 

Functions

UPB_INLINE void upb_value_setfloat (upb_value *val, float cval)
 
UPB_INLINE void upb_value_setdouble (upb_value *val, double cval)
 
UPB_INLINE upb_value upb_value_float (float cval)
 
UPB_INLINE upb_value upb_value_double (double cval)
 
UPB_INLINE upb_StringView upb_key_strview (upb_key key)
 
UPB_INLINE size_t upb_table_size (const upb_table *t)
 
UPB_INLINE upb_key upb_key_empty (void)
 
UPB_INLINE bool upb_tabent_isempty (const upb_tabent *e)
 
uint32_t _upb_Hash (const void *p, size_t n, uint64_t seed)
 

Macro Definition Documentation

◆ FUNCS

#define FUNCS ( name,
membername,
type_t,
converter )
Value:
UPB_INLINE void upb_value_set##name(upb_value* val, type_t cval) { \
val->val = (uint64_t)cval; \
} \
UPB_INLINE upb_value upb_value_##name(type_t val) { \
upb_value ret; \
upb_value_set##name(&ret, val); \
return ret; \
} \
UPB_INLINE type_t upb_value_get##name(upb_value val) { \
return (type_t)(converter)val.val; \
}
#define UPB_INLINE
Definition def.inc:144
Definition common.h:44
uint64_t val
Definition common.h:45

Typedef Documentation

◆ upb_tabent

typedef struct _upb_tabent upb_tabent

Function Documentation

◆ _upb_Hash()

uint32_t _upb_Hash ( const void * p,
size_t n,
uint64_t seed )

◆ upb_key_empty()

UPB_INLINE upb_key upb_key_empty ( void )

◆ upb_key_strview()

UPB_INLINE upb_StringView upb_key_strview ( upb_key key)

◆ upb_tabent_isempty()

UPB_INLINE bool upb_tabent_isempty ( const upb_tabent * e)

◆ upb_table_size()

UPB_INLINE size_t upb_table_size ( const upb_table * t)

◆ upb_value_double()

UPB_INLINE upb_value upb_value_double ( double cval)

◆ upb_value_float()

UPB_INLINE upb_value upb_value_float ( float cval)

◆ upb_value_setdouble()

UPB_INLINE void upb_value_setdouble ( upb_value * val,
double cval )

◆ upb_value_setfloat()

UPB_INLINE void upb_value_setfloat ( upb_value * val,
float cval )