blob: 437b61afe173a6159d363150680465663104e1e1 [file] [log] [blame]
#ifndef FLATBUFFERS_COMMON_READER_H
#define FLATBUFFERS_COMMON_READER_H
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */
/* Common FlatBuffers read functionality for C. */
#include "flatcc/flatcc_prologue.h"
#include "flatcc/flatcc_flatbuffers.h"
#define __flatbuffers_read_scalar_at_byteoffset(N, p, o) N ## _read_from_pe((uint8_t *)(p) + (o))
#define __flatbuffers_read_scalar(N, p) N ## _read_from_pe(p)
#define __flatbuffers_read_vt(ID, offset, t)\
flatbuffers_voffset_t offset = 0;\
{ flatbuffers_voffset_t id__tmp, *vt__tmp;\
FLATCC_ASSERT(t != 0 && "null pointer table access");\
id__tmp = ID;\
vt__tmp = (flatbuffers_voffset_t *)((uint8_t *)(t) -\
__flatbuffers_soffset_read_from_pe(t));\
if (__flatbuffers_voffset_read_from_pe(vt__tmp) >= sizeof(vt__tmp[0]) * (id__tmp + 3u)) {\
offset = __flatbuffers_voffset_read_from_pe(vt__tmp + id__tmp + 2);\
}\
}
#define __flatbuffers_field_present(ID, t) { __flatbuffers_read_vt(ID, offset__tmp, t) return offset__tmp != 0; }
#define __flatbuffers_scalar_field(T, ID, t)\
{\
__flatbuffers_read_vt(ID, offset__tmp, t)\
if (offset__tmp) {\
return (const T *)((uint8_t *)(t) + offset__tmp);\
}\
return 0;\
}
#define __flatbuffers_define_scalar_field(ID, N, NK, TK, T, V)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
{ __flatbuffers_read_vt(ID, offset__tmp, t__tmp)\
return offset__tmp ? __flatbuffers_read_scalar_at_byteoffset(TK, t__tmp, offset__tmp) : V;\
}\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
{ __flatbuffers_read_vt(ID, offset__tmp, t__tmp)\
return offset__tmp ? __flatbuffers_read_scalar_at_byteoffset(TK, t__tmp, offset__tmp) : V;\
}\
static inline const T *N ## _ ## NK ## _get_ptr(N ## _table_t t__tmp)\
__flatbuffers_scalar_field(T, ID, t__tmp)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)\
__flatbuffers_define_scan_by_scalar_field(N, NK, T)
#define __flatbuffers_define_scalar_optional_field(ID, N, NK, TK, T, V)\
__flatbuffers_define_scalar_field(ID, N, NK, TK, T, V)\
static inline TK ## _option_t N ## _ ## NK ## _option(N ## _table_t t__tmp)\
{ TK ## _option_t ret; __flatbuffers_read_vt(ID, offset__tmp, t__tmp)\
ret.is_null = offset__tmp == 0; ret.value = offset__tmp ?\
__flatbuffers_read_scalar_at_byteoffset(TK, t__tmp, offset__tmp) : V;\
return ret; }
#define __flatbuffers_struct_field(T, ID, t, r)\
{\
__flatbuffers_read_vt(ID, offset__tmp, t)\
if (offset__tmp) {\
return (T)((uint8_t *)(t) + offset__tmp);\
}\
FLATCC_ASSERT(!(r) && "required field missing");\
return 0;\
}
#define __flatbuffers_offset_field(T, ID, t, r, adjust)\
{\
flatbuffers_uoffset_t *elem__tmp;\
__flatbuffers_read_vt(ID, offset__tmp, t)\
if (offset__tmp) {\
elem__tmp = (flatbuffers_uoffset_t *)((uint8_t *)(t) + offset__tmp);\
/* Add sizeof so C api can have raw access past header field. */\
return (T)((uint8_t *)(elem__tmp) + adjust +\
__flatbuffers_uoffset_read_from_pe(elem__tmp));\
}\
FLATCC_ASSERT(!(r) && "required field missing");\
return 0;\
}
#define __flatbuffers_vector_field(T, ID, t, r) __flatbuffers_offset_field(T, ID, t, r, sizeof(flatbuffers_uoffset_t))
#define __flatbuffers_table_field(T, ID, t, r) __flatbuffers_offset_field(T, ID, t, r, 0)
#define __flatbuffers_define_struct_field(ID, N, NK, T, r)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_struct_field(T, ID, t__tmp, r)\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_struct_field(T, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)
#define __flatbuffers_define_vector_field(ID, N, NK, T, r)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_vector_field(T, ID, t__tmp, r)\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_vector_field(T, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)
#define __flatbuffers_define_table_field(ID, N, NK, T, r)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_table_field(T, ID, t__tmp, r)\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_table_field(T, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)
#define __flatbuffers_define_string_field(ID, N, NK, r)\
static inline flatbuffers_string_t N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_vector_field(flatbuffers_string_t, ID, t__tmp, r)\
static inline flatbuffers_string_t N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_vector_field(flatbuffers_string_t, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)\
__flatbuffers_define_scan_by_string_field(N, NK)
#define __flatbuffers_vec_len(vec)\
{ return (vec) ? (size_t)__flatbuffers_uoffset_read_from_pe((flatbuffers_uoffset_t *)vec - 1) : 0; }
#define __flatbuffers_string_len(s) __flatbuffers_vec_len(s)
static inline size_t flatbuffers_vec_len(const void *vec)
__flatbuffers_vec_len(vec)
#define __flatbuffers_scalar_vec_at(N, vec, i)\
{ FLATCC_ASSERT(flatbuffers_vec_len(vec) > (i) && "index out of range");\
return __flatbuffers_read_scalar(N, &(vec)[i]); }
#define __flatbuffers_struct_vec_at(vec, i)\
{ FLATCC_ASSERT(flatbuffers_vec_len(vec) > (i) && "index out of range"); return (vec) + (i); }
/* `adjust` skips past the header for string vectors. */
#define __flatbuffers_offset_vec_at(T, vec, i, adjust)\
{ const flatbuffers_uoffset_t *elem__tmp = (vec) + (i);\
FLATCC_ASSERT(flatbuffers_vec_len(vec) > (i) && "index out of range");\
return (T)((uint8_t *)(elem__tmp) + (size_t)__flatbuffers_uoffset_read_from_pe(elem__tmp) + (adjust)); }
#define __flatbuffers_define_scalar_vec_len(N)\
static inline size_t N ## _vec_len(N ##_vec_t vec__tmp)\
{ return flatbuffers_vec_len(vec__tmp); }
#define __flatbuffers_define_scalar_vec_at(N, T) \
static inline T N ## _vec_at(N ## _vec_t vec__tmp, size_t i__tmp)\
__flatbuffers_scalar_vec_at(N, vec__tmp, i__tmp)
typedef const char *flatbuffers_string_t;
static inline size_t flatbuffers_string_len(flatbuffers_string_t s)
__flatbuffers_string_len(s)
typedef const flatbuffers_uoffset_t *flatbuffers_string_vec_t;
typedef flatbuffers_uoffset_t *flatbuffers_string_mutable_vec_t;
static inline size_t flatbuffers_string_vec_len(flatbuffers_string_vec_t vec)
__flatbuffers_vec_len(vec)
static inline flatbuffers_string_t flatbuffers_string_vec_at(flatbuffers_string_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(flatbuffers_string_t, vec, i, sizeof(vec[0]))
typedef const void *flatbuffers_generic_t;
typedef void *flatbuffers_mutable_generic_t;
static inline flatbuffers_string_t flatbuffers_string_cast_from_generic(const flatbuffers_generic_t p)
{ return p ? ((const char *)p) + __flatbuffers_uoffset__size() : 0; }
typedef const flatbuffers_uoffset_t *flatbuffers_generic_vec_t;
typedef flatbuffers_uoffset_t *flatbuffers_generic_table_mutable_vec_t;
static inline size_t flatbuffers_generic_vec_len(flatbuffers_generic_vec_t vec)
__flatbuffers_vec_len(vec)
static inline flatbuffers_generic_t flatbuffers_generic_vec_at(flatbuffers_generic_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(flatbuffers_generic_t, vec, i, 0)
static inline flatbuffers_generic_t flatbuffers_generic_vec_at_as_string(flatbuffers_generic_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(flatbuffers_generic_t, vec, i, sizeof(vec[0]))
typedef struct flatbuffers_union {
flatbuffers_union_type_t type;
flatbuffers_generic_t value;
} flatbuffers_union_t;
typedef struct flatbuffers_union_vec {
const flatbuffers_union_type_t *type;
const flatbuffers_uoffset_t *value;
} flatbuffers_union_vec_t;
typedef struct flatbuffers_mutable_union {
flatbuffers_union_type_t type;
flatbuffers_mutable_generic_t value;
} flatbuffers_mutable_union_t;
typedef struct flatbuffers_mutable_union_vec {
flatbuffers_union_type_t *type;
flatbuffers_uoffset_t *value;
} flatbuffers_mutable_union_vec_t;
static inline flatbuffers_mutable_union_t flatbuffers_mutable_union_cast(flatbuffers_union_t u__tmp)\
{ flatbuffers_mutable_union_t mu = { u__tmp.type, (flatbuffers_mutable_generic_t)u__tmp.value };\
return mu; }
static inline flatbuffers_mutable_union_vec_t flatbuffers_mutable_union_vec_cast(flatbuffers_union_vec_t uv__tmp)\
{ flatbuffers_mutable_union_vec_t muv =\
{ (flatbuffers_union_type_t *)uv__tmp.type, (flatbuffers_uoffset_t *)uv__tmp.value }; return muv; }
#define __flatbuffers_union_type_field(ID, t)\
{\
__flatbuffers_read_vt(ID, offset__tmp, t)\
return offset__tmp ? __flatbuffers_read_scalar_at_byteoffset(__flatbuffers_utype, t, offset__tmp) : 0;\
}
static inline flatbuffers_string_t flatbuffers_string_cast_from_union(const flatbuffers_union_t u__tmp)\
{ return flatbuffers_string_cast_from_generic(u__tmp.value); }
#define __flatbuffers_define_union_field(NS, ID, N, NK, T, r)\
static inline T ## _union_type_t N ## _ ## NK ## _type_get(N ## _table_t t__tmp)\
__## NS ## union_type_field(((ID) - 1), t__tmp)\
static inline NS ## generic_t N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__## NS ## table_field(NS ## generic_t, ID, t__tmp, r)\
static inline T ## _union_type_t N ## _ ## NK ## _type(N ## _table_t t__tmp)\
__## NS ## union_type_field(((ID) - 1), t__tmp)\
static inline NS ## generic_t N ## _ ## NK(N ## _table_t t__tmp)\
__## NS ## table_field(NS ## generic_t, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__## NS ## field_present(ID, t__tmp)\
static inline T ## _union_t N ## _ ## NK ## _union(N ## _table_t t__tmp)\
{ T ## _union_t u__tmp = { 0, 0 }; u__tmp.type = N ## _ ## NK ## _type_get(t__tmp);\
if (u__tmp.type == 0) return u__tmp; u__tmp.value = N ## _ ## NK ## _get(t__tmp); return u__tmp; }\
static inline NS ## string_t N ## _ ## NK ## _as_string(N ## _table_t t__tmp)\
{ return NS ## string_cast_from_generic(N ## _ ## NK ## _get(t__tmp)); }\
#define __flatbuffers_define_union_vector_ops(NS, T)\
static inline size_t T ## _union_vec_len(T ## _union_vec_t uv__tmp)\
{ return NS ## vec_len(uv__tmp.type); }\
static inline T ## _union_t T ## _union_vec_at(T ## _union_vec_t uv__tmp, size_t i__tmp)\
{ T ## _union_t u__tmp = { 0, 0 }; size_t n__tmp = NS ## vec_len(uv__tmp.type);\
FLATCC_ASSERT(n__tmp > (i__tmp) && "index out of range"); u__tmp.type = uv__tmp.type[i__tmp];\
/* Unknown type is treated as NONE for schema evolution. */\
if (u__tmp.type == 0) return u__tmp;\
u__tmp.value = NS ## generic_vec_at(uv__tmp.value, i__tmp); return u__tmp; }\
static inline NS ## string_t T ## _union_vec_at_as_string(T ## _union_vec_t uv__tmp, size_t i__tmp)\
{ return (NS ## string_t) NS ## generic_vec_at_as_string(uv__tmp.value, i__tmp); }\
#define __flatbuffers_define_union_vector(NS, T)\
typedef NS ## union_vec_t T ## _union_vec_t;\
typedef NS ## mutable_union_vec_t T ## _mutable_union_vec_t;\
static inline T ## _mutable_union_vec_t T ## _mutable_union_vec_cast(T ## _union_vec_t u__tmp)\
{ return NS ## mutable_union_vec_cast(u__tmp); }\
__## NS ## define_union_vector_ops(NS, T)
#define __flatbuffers_define_union(NS, T)\
typedef NS ## union_t T ## _union_t;\
typedef NS ## mutable_union_t T ## _mutable_union_t;\
static inline T ## _mutable_union_t T ## _mutable_union_cast(T ## _union_t u__tmp)\
{ return NS ## mutable_union_cast(u__tmp); }\
__## NS ## define_union_vector(NS, T)
#define __flatbuffers_define_union_vector_field(NS, ID, N, NK, T, r)\
__## NS ## define_vector_field(ID - 1, N, NK ## _type, T ## _vec_t, r)\
__## NS ## define_vector_field(ID, N, NK, flatbuffers_generic_vec_t, r)\
static inline T ## _union_vec_t N ## _ ## NK ## _union(N ## _table_t t__tmp)\
{ T ## _union_vec_t uv__tmp; uv__tmp.type = N ## _ ## NK ## _type_get(t__tmp);\
uv__tmp.value = N ## _ ## NK(t__tmp);\
FLATCC_ASSERT(NS ## vec_len(uv__tmp.type) == NS ## vec_len(uv__tmp.value)\
&& "union vector type length mismatch"); return uv__tmp; }
#include <string.h>
static const size_t flatbuffers_not_found = (size_t)-1;
static const size_t flatbuffers_end = (size_t)-1;
#define __flatbuffers_identity(n) (n)
#define __flatbuffers_min(a, b) ((a) < (b) ? (a) : (b))
/* Subtraction doesn't work for unsigned types. */
#define __flatbuffers_scalar_cmp(x, y, n) ((x) < (y) ? -1 : (x) > (y))
static inline int __flatbuffers_string_n_cmp(flatbuffers_string_t v, const char *s, size_t n)
{ size_t nv = flatbuffers_string_len(v); int x = strncmp(v, s, nv < n ? nv : n);
return x != 0 ? x : nv < n ? -1 : nv > n; }
/* `n` arg unused, but needed by string find macro expansion. */
static inline int __flatbuffers_string_cmp(flatbuffers_string_t v, const char *s, size_t n) { (void)n; return strcmp(v, s); }
/* A = identity if searching scalar vectors rather than key fields. */
/* Returns lowest matching index or not_found. */
#define __flatbuffers_find_by_field(A, V, E, L, K, Kn, T, D)\
{ T v__tmp; size_t a__tmp = 0, b__tmp, m__tmp; if (!(b__tmp = L(V))) { return flatbuffers_not_found; }\
--b__tmp;\
while (a__tmp < b__tmp) {\
m__tmp = a__tmp + ((b__tmp - a__tmp) >> 1);\
v__tmp = A(E(V, m__tmp));\
if ((D(v__tmp, (K), (Kn))) < 0) {\
a__tmp = m__tmp + 1;\
} else {\
b__tmp = m__tmp;\
}\
}\
if (a__tmp == b__tmp) {\
v__tmp = A(E(V, a__tmp));\
if (D(v__tmp, (K), (Kn)) == 0) {\
return a__tmp;\
}\
}\
return flatbuffers_not_found;\
}
#define __flatbuffers_find_by_scalar_field(A, V, E, L, K, T)\
__flatbuffers_find_by_field(A, V, E, L, K, 0, T, __flatbuffers_scalar_cmp)
#define __flatbuffers_find_by_string_field(A, V, E, L, K)\
__flatbuffers_find_by_field(A, V, E, L, K, 0, flatbuffers_string_t, __flatbuffers_string_cmp)
#define __flatbuffers_find_by_string_n_field(A, V, E, L, K, Kn)\
__flatbuffers_find_by_field(A, V, E, L, K, Kn, flatbuffers_string_t, __flatbuffers_string_n_cmp)
#define __flatbuffers_define_find_by_scalar_field(N, NK, TK)\
static inline size_t N ## _vec_find_by_ ## NK(N ## _vec_t vec__tmp, TK key__tmp)\
__flatbuffers_find_by_scalar_field(N ## _ ## NK, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, TK)
#define __flatbuffers_define_scalar_find(N, T)\
static inline size_t N ## _vec_find(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_find_by_scalar_field(__flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)
#define __flatbuffers_define_find_by_string_field(N, NK) \
/* Note: find only works on vectors sorted by this field. */\
static inline size_t N ## _vec_find_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp)\
__flatbuffers_find_by_string_field(N ## _ ## NK, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_find_n_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_find_by_string_n_field(N ## _ ## NK, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)
#define __flatbuffers_define_default_find_by_scalar_field(N, NK, TK)\
static inline size_t N ## _vec_find(N ## _vec_t vec__tmp, TK key__tmp)\
{ return N ## _vec_find_by_ ## NK(vec__tmp, key__tmp); }
#define __flatbuffers_define_default_find_by_string_field(N, NK) \
static inline size_t N ## _vec_find(N ## _vec_t vec__tmp, const char *s__tmp)\
{ return N ## _vec_find_by_ ## NK(vec__tmp, s__tmp); }\
static inline size_t N ## _vec_find_n(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_find_n_by_ ## NK(vec__tmp, s__tmp, n__tmp); }
/* A = identity if searching scalar vectors rather than key fields. */
/* Returns lowest matching index or not_found. */
#define __flatbuffers_scan_by_field(b, e, A, V, E, L, K, Kn, T, D)\
{ T v__tmp; size_t i__tmp;\
for (i__tmp = b; i__tmp < e; ++i__tmp) {\
v__tmp = A(E(V, i__tmp));\
if (D(v__tmp, (K), (Kn)) == 0) {\
return i__tmp;\
}\
}\
return flatbuffers_not_found;\
}
#define __flatbuffers_rscan_by_field(b, e, A, V, E, L, K, Kn, T, D)\
{ T v__tmp; size_t i__tmp = e;\
while (i__tmp-- > b) {\
v__tmp = A(E(V, i__tmp));\
if (D(v__tmp, (K), (Kn)) == 0) {\
return i__tmp;\
}\
}\
return flatbuffers_not_found;\
}
#define __flatbuffers_scan_by_scalar_field(b, e, A, V, E, L, K, T)\
__flatbuffers_scan_by_field(b, e, A, V, E, L, K, 0, T, __flatbuffers_scalar_cmp)
#define __flatbuffers_scan_by_string_field(b, e, A, V, E, L, K)\
__flatbuffers_scan_by_field(b, e, A, V, E, L, K, 0, flatbuffers_string_t, __flatbuffers_string_cmp)
#define __flatbuffers_scan_by_string_n_field(b, e, A, V, E, L, K, Kn)\
__flatbuffers_scan_by_field(b, e, A, V, E, L, K, Kn, flatbuffers_string_t, __flatbuffers_string_n_cmp)
#define __flatbuffers_rscan_by_scalar_field(b, e, A, V, E, L, K, T)\
__flatbuffers_rscan_by_field(b, e, A, V, E, L, K, 0, T, __flatbuffers_scalar_cmp)
#define __flatbuffers_rscan_by_string_field(b, e, A, V, E, L, K)\
__flatbuffers_rscan_by_field(b, e, A, V, E, L, K, 0, flatbuffers_string_t, __flatbuffers_string_cmp)
#define __flatbuffers_rscan_by_string_n_field(b, e, A, V, E, L, K, Kn)\
__flatbuffers_rscan_by_field(b, e, A, V, E, L, K, Kn, flatbuffers_string_t, __flatbuffers_string_n_cmp)
#define __flatbuffers_define_scan_by_scalar_field(N, NK, T)\
static inline size_t N ## _vec_scan_by_ ## NK(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_scan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan_by_ ## NK(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)
#define __flatbuffers_define_scalar_scan(N, T)\
static inline size_t N ## _vec_scan(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(0, N ## _vec_len(vec__tmp), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_scan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(0, N ## _vec_len(vec__tmp), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)
#define __flatbuffers_define_scan_by_string_field(N, NK) \
static inline size_t N ## _vec_scan_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp)\
__flatbuffers_scan_by_string_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_scan_n_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_scan_by_string_n_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)\
static inline size_t N ## _vec_scan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
__flatbuffers_scan_by_string_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_scan_ex_n_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_scan_by_string_n_field(begin__tmp, __flatbuffers_min( end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)\
static inline size_t N ## _vec_rscan_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp)\
__flatbuffers_rscan_by_string_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_rscan_n_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_rscan_by_string_n_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)\
static inline size_t N ## _vec_rscan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
__flatbuffers_rscan_by_string_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_rscan_ex_n_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_rscan_by_string_n_field(begin__tmp, __flatbuffers_min( end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)
#define __flatbuffers_define_default_scan_by_scalar_field(N, NK, TK)\
static inline size_t N ## _vec_scan(N ## _vec_t vec__tmp, TK key__tmp)\
{ return N ## _vec_scan_by_ ## NK(vec__tmp, key__tmp); }\
static inline size_t N ## _vec_scan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, TK key__tmp)\
{ return N ## _vec_scan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, key__tmp); }\
static inline size_t N ## _vec_rscan(N ## _vec_t vec__tmp, TK key__tmp)\
{ return N ## _vec_rscan_by_ ## NK(vec__tmp, key__tmp); }\
static inline size_t N ## _vec_rscan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, TK key__tmp)\
{ return N ## _vec_rscan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, key__tmp); }
#define __flatbuffers_define_default_scan_by_string_field(N, NK) \
static inline size_t N ## _vec_scan(N ## _vec_t vec__tmp, const char *s__tmp)\
{ return N ## _vec_scan_by_ ## NK(vec__tmp, s__tmp); }\
static inline size_t N ## _vec_scan_n(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_scan_n_by_ ## NK(vec__tmp, s__tmp, n__tmp); }\
static inline size_t N ## _vec_scan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
{ return N ## _vec_scan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp); }\
static inline size_t N ## _vec_scan_ex_n(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_scan_ex_n_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp, n__tmp); }\
static inline size_t N ## _vec_rscan(N ## _vec_t vec__tmp, const char *s__tmp)\
{ return N ## _vec_rscan_by_ ## NK(vec__tmp, s__tmp); }\
static inline size_t N ## _vec_rscan_n(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_rscan_n_by_ ## NK(vec__tmp, s__tmp, n__tmp); }\
static inline size_t N ## _vec_rscan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
{ return N ## _vec_rscan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp); }\
static inline size_t N ## _vec_rscan_ex_n(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_rscan_ex_n_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp, n__tmp); }
#define __flatbuffers_heap_sort(N, X, A, E, L, TK, TE, D, S)\
static inline void __ ## N ## X ## __heap_sift_down(\
N ## _mutable_vec_t vec__tmp, size_t start__tmp, size_t end__tmp)\
{ size_t child__tmp, root__tmp; TK v1__tmp, v2__tmp, vroot__tmp;\
root__tmp = start__tmp;\
while ((root__tmp << 1) <= end__tmp) {\
child__tmp = root__tmp << 1;\
if (child__tmp < end__tmp) {\
v1__tmp = A(E(vec__tmp, child__tmp));\
v2__tmp = A(E(vec__tmp, child__tmp + 1));\
if (D(v1__tmp, v2__tmp) < 0) {\
child__tmp++;\
}\
}\
vroot__tmp = A(E(vec__tmp, root__tmp));\
v1__tmp = A(E(vec__tmp, child__tmp));\
if (D(vroot__tmp, v1__tmp) < 0) {\
S(vec__tmp, root__tmp, child__tmp, TE);\
root__tmp = child__tmp;\
} else {\
return;\
}\
}\
}\
static inline void __ ## N ## X ## __heap_sort(N ## _mutable_vec_t vec__tmp)\
{ size_t start__tmp, end__tmp, size__tmp;\
size__tmp = L(vec__tmp); if (size__tmp == 0) return; end__tmp = size__tmp - 1; start__tmp = size__tmp >> 1;\
do { __ ## N ## X ## __heap_sift_down(vec__tmp, start__tmp, end__tmp); } while (start__tmp--);\
while (end__tmp > 0) { \
S(vec__tmp, 0, end__tmp, TE);\
__ ## N ## X ## __heap_sift_down(vec__tmp, 0, --end__tmp); } }
#define __flatbuffers_define_sort_by_field(N, NK, TK, TE, D, S)\
__flatbuffers_heap_sort(N, _sort_by_ ## NK, N ## _ ## NK ## _get, N ## _vec_at, N ## _vec_len, TK, TE, D, S)\
static inline void N ## _vec_sort_by_ ## NK(N ## _mutable_vec_t vec__tmp)\
{ __ ## N ## _sort_by_ ## NK ## __heap_sort(vec__tmp); }
#define __flatbuffers_define_sort(N, TK, TE, D, S)\
__flatbuffers_heap_sort(N, , __flatbuffers_identity, N ## _vec_at, N ## _vec_len, TK, TE, D, S)\
static inline void N ## _vec_sort(N ## _mutable_vec_t vec__tmp) { __ ## N ## __heap_sort(vec__tmp); }
#define __flatbuffers_scalar_diff(x, y) ((x) < (y) ? -1 : (x) > (y))
#define __flatbuffers_string_diff(x, y) __flatbuffers_string_n_cmp((x), (const char *)(y), flatbuffers_string_len(y))
#define __flatbuffers_value_swap(vec, a, b, TE) { TE x__tmp = vec[b]; vec[b] = vec[a]; vec[a] = x__tmp; }
#define __flatbuffers_uoffset_swap(vec, a, b, TE)\
{ TE ta__tmp, tb__tmp, d__tmp;\
d__tmp = (TE)((a - b) * sizeof(vec[0]));\
ta__tmp = __flatbuffers_uoffset_read_from_pe(vec + b) - d__tmp;\
tb__tmp = __flatbuffers_uoffset_read_from_pe(vec + a) + d__tmp;\
__flatbuffers_uoffset_write_to_pe(vec + a, ta__tmp);\
__flatbuffers_uoffset_write_to_pe(vec + b, tb__tmp); }
#define __flatbuffers_scalar_swap(vec, a, b, TE) __flatbuffers_value_swap(vec, a, b, TE)
#define __flatbuffers_string_swap(vec, a, b, TE) __flatbuffers_uoffset_swap(vec, a, b, TE)
#define __flatbuffers_struct_swap(vec, a, b, TE) __flatbuffers_value_swap(vec, a, b, TE)
#define __flatbuffers_table_swap(vec, a, b, TE) __flatbuffers_uoffset_swap(vec, a, b, TE)
#define __flatbuffers_define_struct_sort_by_scalar_field(N, NK, TK, TE)\
__flatbuffers_define_sort_by_field(N, NK, TK, TE, __flatbuffers_scalar_diff, __flatbuffers_struct_swap)
#define __flatbuffers_define_table_sort_by_scalar_field(N, NK, TK)\
__flatbuffers_define_sort_by_field(N, NK, TK, flatbuffers_uoffset_t, __flatbuffers_scalar_diff, __flatbuffers_table_swap)
#define __flatbuffers_define_table_sort_by_string_field(N, NK)\
__flatbuffers_define_sort_by_field(N, NK, flatbuffers_string_t, flatbuffers_uoffset_t, __flatbuffers_string_diff, __flatbuffers_table_swap)
#define __flatbuffers_define_scalar_sort(N, T) __flatbuffers_define_sort(N, T, T, __flatbuffers_scalar_diff, __flatbuffers_scalar_swap)
#define __flatbuffers_define_string_sort() __flatbuffers_define_sort(flatbuffers_string, flatbuffers_string_t, flatbuffers_uoffset_t, __flatbuffers_string_diff, __flatbuffers_string_swap)
#define __flatbuffers_sort_vector_field(N, NK, T, t)\
{ T ## _mutable_vec_t v__tmp = (T ## _mutable_vec_t) N ## _ ## NK ## _get(t);\
if (v__tmp) T ## _vec_sort(v__tmp); }
#define __flatbuffers_sort_table_field(N, NK, T, t)\
{ T ## _sort((T ## _mutable_table_t)N ## _ ## NK ## _get(t)); }
#define __flatbuffers_sort_union_field(N, NK, T, t)\
{ T ## _sort(T ## _mutable_union_cast(N ## _ ## NK ## _union(t))); }
#define __flatbuffers_sort_table_vector_field_elements(N, NK, T, t)\
{ T ## _vec_t v__tmp = N ## _ ## NK ## _get(t); size_t i__tmp, n__tmp;\
n__tmp = T ## _vec_len(v__tmp); for (i__tmp = 0; i__tmp < n__tmp; ++i__tmp) {\
T ## _sort((T ## _mutable_table_t)T ## _vec_at(v__tmp, i__tmp)); }}
#define __flatbuffers_sort_union_vector_field_elements(N, NK, T, t)\
{ T ## _union_vec_t v__tmp = N ## _ ## NK ## _union(t); size_t i__tmp, n__tmp;\
n__tmp = T ## _union_vec_len(v__tmp); for (i__tmp = 0; i__tmp < n__tmp; ++i__tmp) {\
T ## _sort(T ## _mutable_union_cast(T ## _union_vec_at(v__tmp, i__tmp))); }}
#define __flatbuffers_define_scalar_vector(N, T)\
typedef const T *N ## _vec_t;\
typedef T *N ## _mutable_vec_t;\
__flatbuffers_define_scalar_vec_len(N)\
__flatbuffers_define_scalar_vec_at(N, T)\
__flatbuffers_define_scalar_find(N, T)\
__flatbuffers_define_scalar_scan(N, T)\
__flatbuffers_define_scalar_sort(N, T)
#define __flatbuffers_define_integer_type(N, T, W)\
__flatcc_define_integer_accessors(N, T, W, flatbuffers_endian)\
__flatbuffers_define_scalar_vector(N, T)
__flatbuffers_define_scalar_vector(flatbuffers_bool, flatbuffers_bool_t)
__flatbuffers_define_scalar_vector(flatbuffers_char, char)
__flatbuffers_define_scalar_vector(flatbuffers_uint8, uint8_t)
__flatbuffers_define_scalar_vector(flatbuffers_int8, int8_t)
__flatbuffers_define_scalar_vector(flatbuffers_uint16, uint16_t)
__flatbuffers_define_scalar_vector(flatbuffers_int16, int16_t)
__flatbuffers_define_scalar_vector(flatbuffers_uint32, uint32_t)
__flatbuffers_define_scalar_vector(flatbuffers_int32, int32_t)
__flatbuffers_define_scalar_vector(flatbuffers_uint64, uint64_t)
__flatbuffers_define_scalar_vector(flatbuffers_int64, int64_t)
__flatbuffers_define_scalar_vector(flatbuffers_float, float)
__flatbuffers_define_scalar_vector(flatbuffers_double, double)
__flatbuffers_define_scalar_vector(flatbuffers_union_type, flatbuffers_union_type_t)
static inline size_t flatbuffers_string_vec_find(flatbuffers_string_vec_t vec, const char *s)
__flatbuffers_find_by_string_field(__flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_find_n(flatbuffers_string_vec_t vec, const char *s, size_t n)
__flatbuffers_find_by_string_n_field(__flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_scan(flatbuffers_string_vec_t vec, const char *s)
__flatbuffers_scan_by_string_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_scan_n(flatbuffers_string_vec_t vec, const char *s, size_t n)
__flatbuffers_scan_by_string_n_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_scan_ex(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s)
__flatbuffers_scan_by_string_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_scan_ex_n(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s, size_t n)
__flatbuffers_scan_by_string_n_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_rscan(flatbuffers_string_vec_t vec, const char *s)
__flatbuffers_rscan_by_string_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_rscan_n(flatbuffers_string_vec_t vec, const char *s, size_t n)
__flatbuffers_rscan_by_string_n_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_rscan_ex(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s)
__flatbuffers_rscan_by_string_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_rscan_ex_n(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s, size_t n)
__flatbuffers_rscan_by_string_n_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
__flatbuffers_define_string_sort()
#define __flatbuffers_define_struct_scalar_fixed_array_field(N, NK, TK, T, L)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp, size_t i__tmp)\
{ if (!t__tmp || i__tmp >= L) return 0;\
return __flatbuffers_read_scalar(TK, &(t__tmp->NK[i__tmp])); }\
static inline const T *N ## _ ## NK ## _get_ptr(N ## _struct_t t__tmp)\
{ return t__tmp ? t__tmp->NK : 0; }\
static inline size_t N ## _ ## NK ## _get_len(void) { return L; }\
static inline T N ## _ ## NK (N ## _struct_t t__tmp, size_t i__tmp)\
{ return N ## _ ## NK ## _get(t__tmp, i__tmp); }
#define __flatbuffers_define_struct_struct_fixed_array_field(N, NK, T, L)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp, size_t i__tmp)\
{ if (!t__tmp || i__tmp >= L) return 0; return t__tmp->NK + i__tmp; }static inline T N ## _ ## NK ## _get_ptr(N ## _struct_t t__tmp)\
{ return t__tmp ? t__tmp->NK : 0; }\
static inline size_t N ## _ ## NK ## _get_len(void) { return L; }\
static inline T N ## _ ## NK(N ## _struct_t t__tmp, size_t i__tmp)\
{ if (!t__tmp || i__tmp >= L) return 0; return t__tmp->NK + i__tmp; }
#define __flatbuffers_define_struct_scalar_field(N, NK, TK, T)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp)\
{ return t__tmp ? __flatbuffers_read_scalar(TK, &(t__tmp->NK)) : 0; }\
static inline const T *N ## _ ## NK ## _get_ptr(N ## _struct_t t__tmp)\
{ return t__tmp ? &(t__tmp->NK) : 0; }\
static inline T N ## _ ## NK (N ## _struct_t t__tmp)\
{ return t__tmp ? __flatbuffers_read_scalar(TK, &(t__tmp->NK)) : 0; }\
__flatbuffers_define_scan_by_scalar_field(N, NK, T)
#define __flatbuffers_define_struct_struct_field(N, NK, T)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp) { return t__tmp ? &(t__tmp->NK) : 0; }\
static inline T N ## _ ## NK (N ## _struct_t t__tmp) { return t__tmp ? &(t__tmp->NK) : 0; }
/* If fid is null, the function returns true without testing as buffer is not expected to have any id. */
static inline int flatbuffers_has_identifier(const void *buffer, const char *fid)
{ flatbuffers_thash_t id, id2 = 0; if (fid == 0) { return 1; };
id2 = flatbuffers_type_hash_from_string(fid);
id = __flatbuffers_thash_read_from_pe(((flatbuffers_uoffset_t *)buffer) + 1);
return id2 == 0 || id == id2; }
static inline int flatbuffers_has_type_hash(const void *buffer, flatbuffers_thash_t thash)
{ return thash == 0 || (__flatbuffers_thash_read_from_pe((flatbuffers_uoffset_t *)buffer + 1) == thash); }
static inline flatbuffers_thash_t flatbuffers_get_type_hash(const void *buffer)
{ return __flatbuffers_thash_read_from_pe((flatbuffers_uoffset_t *)buffer + 1); }
#define flatbuffers_verify_endian() flatbuffers_has_identifier("\x00\x00\x00\x00" "1234", "1234")
static inline void *flatbuffers_read_size_prefix(void *b, size_t *size_out)
{ if (size_out) { *size_out = (size_t)__flatbuffers_uoffset_read_from_pe(b); }
return (uint8_t *)b + sizeof(flatbuffers_uoffset_t); }
/* Null file identifier accepts anything, otherwise fid should be 4 characters. */
#define __flatbuffers_read_root(T, K, buffer, fid)\
((!buffer || !flatbuffers_has_identifier(buffer, fid)) ? 0 :\
((T ## _ ## K ## t)(((uint8_t *)buffer) +\
__flatbuffers_uoffset_read_from_pe(buffer))))
#define __flatbuffers_read_typed_root(T, K, buffer, thash)\
((!buffer || !flatbuffers_has_type_hash(buffer, thash)) ? 0 :\
((T ## _ ## K ## t)(((uint8_t *)buffer) +\
__flatbuffers_uoffset_read_from_pe(buffer))))
#define __flatbuffers_nested_buffer_as_root(C, N, T, K)\
static inline T ## _ ## K ## t C ## _ ## N ## _as_root_with_identifier(C ## _ ## table_t t__tmp, const char *fid__tmp)\
{ const uint8_t *buffer__tmp = C ## _ ## N(t__tmp); return __flatbuffers_read_root(T, K, buffer__tmp, fid__tmp); }\
static inline T ## _ ## K ## t C ## _ ## N ## _as_typed_root(C ## _ ## table_t t__tmp)\
{ const uint8_t *buffer__tmp = C ## _ ## N(t__tmp); return __flatbuffers_read_root(T, K, buffer__tmp, C ## _ ## type_identifier); }\
static inline T ## _ ## K ## t C ## _ ## N ## _as_root(C ## _ ## table_t t__tmp)\
{ const char *fid__tmp = T ## _file_identifier;\
const uint8_t *buffer__tmp = C ## _ ## N(t__tmp); return __flatbuffers_read_root(T, K, buffer__tmp, fid__tmp); }
#define __flatbuffers_buffer_as_root(N, K)\
static inline N ## _ ## K ## t N ## _as_root_with_identifier(const void *buffer__tmp, const char *fid__tmp)\
{ return __flatbuffers_read_root(N, K, buffer__tmp, fid__tmp); }\
static inline N ## _ ## K ## t N ## _as_root_with_type_hash(const void *buffer__tmp, flatbuffers_thash_t thash__tmp)\
{ return __flatbuffers_read_typed_root(N, K, buffer__tmp, thash__tmp); }\
static inline N ## _ ## K ## t N ## _as_root(const void *buffer__tmp)\
{ const char *fid__tmp = N ## _file_identifier;\
return __flatbuffers_read_root(N, K, buffer__tmp, fid__tmp); }\
static inline N ## _ ## K ## t N ## _as_typed_root(const void *buffer__tmp)\
{ return __flatbuffers_read_typed_root(N, K, buffer__tmp, N ## _type_hash); }
#define __flatbuffers_struct_as_root(N) __flatbuffers_buffer_as_root(N, struct_)
#define __flatbuffers_table_as_root(N) __flatbuffers_buffer_as_root(N, table_)
#include "flatcc/flatcc_epilogue.h"
#endif /* FLATBUFFERS_COMMON_H */
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#define FLATBUFFERS_COMMON_BUILDER_H
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */
/* Common FlatBuffers build functionality for C. */
#include "flatcc/flatcc_prologue.h"
#ifndef FLATBUILDER_H
#include "flatcc/flatcc_builder.h"
#endif
typedef flatcc_builder_t flatbuffers_builder_t;
typedef flatcc_builder_ref_t flatbuffers_ref_t;
typedef flatcc_builder_ref_t flatbuffers_vec_ref_t;
typedef flatcc_builder_union_ref_t flatbuffers_union_ref_t;
typedef flatcc_builder_union_vec_ref_t flatbuffers_union_vec_ref_t;
/* integer return code (ref and ptr always fail on 0) */
#define flatbuffers_failed(x) ((x) < 0)
typedef flatbuffers_ref_t flatbuffers_root_t;
#define flatbuffers_root(ref) ((flatbuffers_root_t)(ref))
#define __flatbuffers_memoize_begin(B, src)\
do { flatcc_builder_ref_t _ref; if ((_ref = flatcc_builder_refmap_find((B), (src)))) return _ref; } while (0)
#define __flatbuffers_memoize_end(B, src, op) do { return flatcc_builder_refmap_insert((B), (src), (op)); } while (0)
#define __flatbuffers_memoize(B, src, op) do { __flatbuffers_memoize_begin(B, src); __flatbuffers_memoize_end(B, src, op); } while (0)
#define __flatbuffers_build_buffer(NS)\
typedef NS ## ref_t NS ## buffer_ref_t;\
static inline int NS ## buffer_start(NS ## builder_t *B, const NS ##fid_t fid)\
{ return flatcc_builder_start_buffer(B, fid, 0, 0); }\
static inline int NS ## buffer_start_with_size(NS ## builder_t *B, const NS ##fid_t fid)\
{ return flatcc_builder_start_buffer(B, fid, 0, flatcc_builder_with_size); }\
static inline int NS ## buffer_start_aligned(NS ## builder_t *B, NS ##fid_t fid, uint16_t block_align)\
{ return flatcc_builder_start_buffer(B, fid, block_align, 0); }\
static inline int NS ## buffer_start_aligned_with_size(NS ## builder_t *B, NS ##fid_t fid, uint16_t block_align)\
{ return flatcc_builder_start_buffer(B, fid, block_align, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t NS ## buffer_end(NS ## builder_t *B, NS ## ref_t root)\
{ return flatcc_builder_end_buffer(B, root); }
#define __flatbuffers_build_table_root(NS, N, FID, TFID)\
static inline int N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? -1 : N ## _start(B); }\
static inline int N ## _start_as_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, FID) ? -1 : N ## _start(B); }\
static inline int N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, TFID) ? -1 : N ## _start(B); }\
static inline int N ## _start_as_typed_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, TFID) ? -1 : N ## _start(B); }\
static inline NS ## buffer_ref_t N ## _end_as_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _end_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _create_as_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start(B, FID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _create_as_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start_with_size(B, FID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start(B, TFID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start_with_size(B, TFID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _clone_as_root(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start(B, FID)) return 0; return NS ## buffer_end(B, N ## _clone(B, t)); }\
static inline NS ## buffer_ref_t N ## _clone_as_root_with_size(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start_with_size(B, FID)) return 0; return NS ## buffer_end(B, N ## _clone(B, t)); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start(B, TFID)) return 0;return NS ## buffer_end(B, N ## _clone(B, t)); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root_with_size(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start_with_size(B, TFID)) return 0; return NS ## buffer_end(B, N ## _clone(B, t)); }
#define __flatbuffers_build_table_prolog(NS, N, FID, TFID)\
__flatbuffers_build_table_vector_ops(NS, N ## _vec, N)\
__flatbuffers_build_table_root(NS, N, FID, TFID)
#define __flatbuffers_build_struct_root(NS, N, A, FID, TFID)\
static inline N ## _t *N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? 0 : N ## _start(B); }\
static inline N ## _t *N ## _start_as_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, FID) ? 0 : N ## _start(B); }\
static inline N ## _t *N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, TFID) ? 0 : N ## _start(B); }\
static inline N ## _t *N ## _start_as_typed_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, TFID) ? 0 : N ## _start(B); }\
static inline NS ## buffer_ref_t N ## _end_as_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _end_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _end_pe_as_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end_pe(B)); }\
static inline NS ## buffer_ref_t N ## _end_pe_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end_pe(B)); }\
static inline NS ## buffer_ref_t N ## _create_as_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, FID, 0,\
N ## _create(B __ ## N ## _call_args), A, 0); }\
static inline NS ## buffer_ref_t N ## _create_as_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, FID, 0,\
N ## _create(B __ ## N ## _call_args), A, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, TFID, 0,\
N ## _create(B __ ## N ## _call_args), A, 0); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, TFID, 0,\
N ## _create(B __ ## N ## _call_args), A, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t N ## _clone_as_root(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, FID, 0, N ## _clone(B, p), A, 0); }\
static inline NS ## buffer_ref_t N ## _clone_as_root_with_size(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, FID, 0, N ## _clone(B, p), A, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, TFID, 0, N ## _clone(B, p), A, 0); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root_with_size(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, TFID, 0, N ## _clone(B, p), A, flatcc_builder_with_size); }
#define __flatbuffers_build_nested_table_root(NS, N, TN, FID, TFID)\
static inline int N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? -1 : TN ## _start(B); }\
static inline int N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, TFID) ? -1 : TN ## _start(B); }\
static inline int N ## _end_as_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _end_as_typed_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
align ? align : 8, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _typed_nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
align ? align : 8, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _clone_as_root(NS ## builder_t *B, TN ## _table_t t)\
{ return N ## _add(B, TN ## _clone_as_root(B, t)); }\
static inline int N ## _clone_as_typed_root(NS ## builder_t *B, TN ## _table_t t)\
{ return N ## _add(B, TN ## _clone_as_typed_root(B, t)); }
#define __flatbuffers_build_nested_struct_root(NS, N, TN, A, FID, TFID)\
static inline TN ## _t *N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? 0 : TN ## _start(B); }\
static inline TN ## _t *N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? 0 : TN ## _start(B); }\
static inline int N ## _end_as_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _end_as_typed_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _end_pe_as_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end_pe(B))); }\
static inline int N ## _create_as_root(NS ## builder_t *B __ ## TN ## _formal_args)\
{ return N ## _add(B, flatcc_builder_create_buffer(B, FID, 0,\
TN ## _create(B __ ## TN ## _call_args), A, flatcc_builder_is_nested)); }\
static inline int N ## _create_as_typed_root(NS ## builder_t *B __ ## TN ## _formal_args)\
{ return N ## _add(B, flatcc_builder_create_buffer(B, TFID, 0,\
TN ## _create(B __ ## TN ## _call_args), A, flatcc_builder_is_nested)); }\
static inline int N ## _nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
align < A ? A : align, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _typed_nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
align < A ? A : align, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _clone_as_root(NS ## builder_t *B, TN ## _struct_t p)\
{ return N ## _add(B, TN ## _clone_as_root(B, p)); }\
static inline int N ## _clone_as_typed_root(NS ## builder_t *B, TN ## _struct_t p)\
{ return N ## _add(B, TN ## _clone_as_typed_root(B, p)); }
#define __flatbuffers_build_vector_ops(NS, V, N, TN, T)\
static inline T *V ## _extend(NS ## builder_t *B, size_t len)\
{ return (T *)flatcc_builder_extend_vector(B, len); }\
static inline T *V ## _append(NS ## builder_t *B, const T *data, size_t len)\
{ return (T *)flatcc_builder_append_vector(B, data, len); }\
static inline int V ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_vector(B, len); }\
static inline T *V ## _edit(NS ## builder_t *B)\
{ return (T *)flatcc_builder_vector_edit(B); }\
static inline size_t V ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_vector_count(B); }\
static inline T *V ## _push(NS ## builder_t *B, const T *p)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? (memcpy(_p, p, TN ## __size()), _p) : 0; }\
static inline T *V ## _push_copy(NS ## builder_t *B, const T *p)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? TN ## _copy(_p, p) : 0; }\
static inline T *V ## _push_clone(NS ## builder_t *B, const T *p)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? TN ## _copy(_p, p) : 0; }\
static inline T *V ## _push_create(NS ## builder_t *B __ ## TN ## _formal_args)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? TN ## _assign(_p __ ## TN ## _call_args) : 0; }
#define __flatbuffers_build_vector(NS, N, T, S, A)\
typedef NS ## ref_t N ## _vec_ref_t;\
static inline int N ## _vec_start(NS ## builder_t *B)\
{ return flatcc_builder_start_vector(B, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
static inline N ## _vec_ref_t N ## _vec_end_pe(NS ## builder_t *B)\
{ return flatcc_builder_end_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_end(NS ## builder_t *B)\
{ if (!NS ## is_native_pe()) { size_t i, n; T *p = (T *)flatcc_builder_vector_edit(B);\
for (i = 0, n = flatcc_builder_vector_count(B); i < n; ++i)\
{ N ## _to_pe(N ## __ptr_add(p, i)); }} return flatcc_builder_end_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_create_pe(NS ## builder_t *B, const T *data, size_t len)\
{ return flatcc_builder_create_vector(B, data, len, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
static inline N ## _vec_ref_t N ## _vec_create(NS ## builder_t *B, const T *data, size_t len)\
{ if (!NS ## is_native_pe()) { size_t i; T *p; int ret = flatcc_builder_start_vector(B, S, A, FLATBUFFERS_COUNT_MAX(S)); if (ret) { return ret; }\
p = (T *)flatcc_builder_extend_vector(B, len); if (!p) return 0;\
for (i = 0; i < len; ++i) { N ## _copy_to_pe(N ## __ptr_add(p, i), N ## __const_ptr_add(data, i)); }\
return flatcc_builder_end_vector(B); } else return flatcc_builder_create_vector(B, data, len, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
static inline N ## _vec_ref_t N ## _vec_clone(NS ## builder_t *B, N ##_vec_t vec)\
{ __flatbuffers_memoize(B, vec, flatcc_builder_create_vector(B, vec, N ## _vec_len(vec), S, A, FLATBUFFERS_COUNT_MAX(S))); }\
static inline N ## _vec_ref_t N ## _vec_slice(NS ## builder_t *B, N ##_vec_t vec, size_t index, size_t len)\
{ size_t n = N ## _vec_len(vec); if (index >= n) index = n; n -= index; if (len > n) len = n;\
return flatcc_builder_create_vector(B, N ## __const_ptr_add(vec, index), len, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
__flatbuffers_build_vector_ops(NS, N ## _vec, N, N, T)
#define __flatbuffers_build_union_vector_ops(NS, V, N, TN)\
static inline TN ## _union_ref_t *V ## _extend(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_extend_union_vector(B, len); }\
static inline TN ## _union_ref_t *V ## _append(NS ## builder_t *B, const TN ## _union_ref_t *data, size_t len)\
{ return flatcc_builder_append_union_vector(B, data, len); }\
static inline int V ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_union_vector(B, len); }\
static inline TN ## _union_ref_t *V ## _edit(NS ## builder_t *B)\
{ return (TN ## _union_ref_t *) flatcc_builder_union_vector_edit(B); }\
static inline size_t V ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_union_vector_count(B); }\
static inline TN ## _union_ref_t *V ## _push(NS ## builder_t *B, const TN ## _union_ref_t ref)\
{ return flatcc_builder_union_vector_push(B, ref); }\
static inline TN ## _union_ref_t *V ## _push_clone(NS ## builder_t *B, TN ## _union_t u)\
{ return TN ## _vec_push(B, TN ## _clone(B, u)); }
#define __flatbuffers_build_union_vector(NS, N)\
static inline int N ## _vec_start(NS ## builder_t *B)\
{ return flatcc_builder_start_union_vector(B); }\
static inline N ## _union_vec_ref_t N ## _vec_end(NS ## builder_t *B)\
{ return flatcc_builder_end_union_vector(B); }\
static inline N ## _union_vec_ref_t N ## _vec_create(NS ## builder_t *B, const N ## _union_ref_t *data, size_t len)\
{ return flatcc_builder_create_union_vector(B, data, len); }\
__flatbuffers_build_union_vector_ops(NS, N ## _vec, N, N)\
/* Preserves DAG structure separately for type and value vector, so a type vector could be shared for many value vectors. */\
static inline N ## _union_vec_ref_t N ## _vec_clone(NS ## builder_t *B, N ##_union_vec_t vec)\
{ N ## _union_vec_ref_t _uvref, _ret = { 0, 0 }; NS ## union_ref_t _uref; size_t _i, _len;\
if (vec.type == 0) return _ret;\
_uvref.type = flatcc_builder_refmap_find(B, vec.type); _uvref.value = flatcc_builder_refmap_find(B, vec.value);\
_len = N ## _union_vec_len(vec); if (_uvref.type == 0) {\
_uvref.type = flatcc_builder_refmap_insert(B, vec.type, (flatcc_builder_create_type_vector(B, vec.type, _len))); }\
if (_uvref.type == 0) return _ret; if (_uvref.value == 0) {\
if (flatcc_builder_start_offset_vector(B)) return _ret;\
for (_i = 0; _i < _len; ++_i) { _uref = N ## _clone(B, N ## _union_vec_at(vec, _i));\
if (!_uref.value || !(flatcc_builder_offset_vector_push(B, _uref.value))) return _ret; }\
_uvref.value = flatcc_builder_refmap_insert(B, vec.value, flatcc_builder_end_offset_vector(B));\
if (_uvref.value == 0) return _ret; } return _uvref; }
#define __flatbuffers_build_string_vector_ops(NS, N)\
static inline int N ## _push_start(NS ## builder_t *B)\
{ return NS ## string_start(B); }\
static inline NS ## string_ref_t *N ## _push_end(NS ## builder_t *B)\
{ return NS ## string_vec_push(B, NS ## string_end(B)); }\
static inline NS ## string_ref_t *N ## _push_create(NS ## builder_t *B, const char *s, size_t len)\
{ return NS ## string_vec_push(B, NS ## string_create(B, s, len)); }\
static inline NS ## string_ref_t *N ## _push_create_str(NS ## builder_t *B, const char *s)\
{ return NS ## string_vec_push(B, NS ## string_create_str(B, s)); }\
static inline NS ## string_ref_t *N ## _push_create_strn(NS ## builder_t *B, const char *s, size_t max_len)\
{ return NS ## string_vec_push(B, NS ## string_create_strn(B, s, max_len)); }\
static inline NS ## string_ref_t *N ## _push_clone(NS ## builder_t *B, NS ## string_t string)\
{ return NS ## string_vec_push(B, NS ## string_clone(B, string)); }\
static inline NS ## string_ref_t *N ## _push_slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ return NS ## string_vec_push(B, NS ## string_slice(B, string, index, len)); }
#define __flatbuffers_build_table_vector_ops(NS, N, TN)\
static inline int N ## _push_start(NS ## builder_t *B)\
{ return TN ## _start(B); }\
static inline TN ## _ref_t *N ## _push_end(NS ## builder_t *B)\
{ return N ## _push(B, TN ## _end(B)); }\
static inline TN ## _ref_t *N ## _push_create(NS ## builder_t *B __ ## TN ##_formal_args)\
{ return N ## _push(B, TN ## _create(B __ ## TN ## _call_args)); }
#define __flatbuffers_build_offset_vector_ops(NS, V, N, TN)\
static inline TN ## _ref_t *V ## _extend(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_extend_offset_vector(B, len); }\
static inline TN ## _ref_t *V ## _append(NS ## builder_t *B, const TN ## _ref_t *data, size_t len)\
{ return flatcc_builder_append_offset_vector(B, data, len); }\
static inline int V ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_offset_vector(B, len); }\
static inline TN ## _ref_t *V ## _edit(NS ## builder_t *B)\
{ return (TN ## _ref_t *)flatcc_builder_offset_vector_edit(B); }\
static inline size_t V ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_offset_vector_count(B); }\
static inline TN ## _ref_t *V ## _push(NS ## builder_t *B, const TN ## _ref_t ref)\
{ return ref ? flatcc_builder_offset_vector_push(B, ref) : 0; }
#define __flatbuffers_build_offset_vector(NS, N)\
typedef NS ## ref_t N ## _vec_ref_t;\
static inline int N ## _vec_start(NS ## builder_t *B)\
{ return flatcc_builder_start_offset_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_end(NS ## builder_t *B)\
{ return flatcc_builder_end_offset_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_create(NS ## builder_t *B, const N ## _ref_t *data, size_t len)\
{ return flatcc_builder_create_offset_vector(B, data, len); }\
__flatbuffers_build_offset_vector_ops(NS, N ## _vec, N, N)\
static inline N ## _vec_ref_t N ## _vec_clone(NS ## builder_t *B, N ##_vec_t vec)\
{ int _ret; N ## _ref_t _e; size_t _i, _len; __flatbuffers_memoize_begin(B, vec);\
_len = N ## _vec_len(vec); if (flatcc_builder_start_offset_vector(B)) return 0;\
for (_i = 0; _i < _len; ++_i) { if (!(_e = N ## _clone(B, N ## _vec_at(vec, _i)))) return 0;\
if (!flatcc_builder_offset_vector_push(B, _e)) return 0; }\
__flatbuffers_memoize_end(B, vec, flatcc_builder_end_offset_vector(B)); }\
#define __flatbuffers_build_string_ops(NS, N)\
static inline char *N ## _append(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_append_string(B, s, len); }\
static inline char *N ## _append_str(NS ## builder_t *B, const char *s)\
{ return flatcc_builder_append_string_str(B, s); }\
static inline char *N ## _append_strn(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_append_string_strn(B, s, len); }\
static inline size_t N ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_string_len(B); }\
static inline char *N ## _extend(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_extend_string(B, len); }\
static inline char *N ## _edit(NS ## builder_t *B)\
{ return flatcc_builder_string_edit(B); }\
static inline int N ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_string(B, len); }
#define __flatbuffers_build_string(NS)\
typedef NS ## ref_t NS ## string_ref_t;\
static inline int NS ## string_start(NS ## builder_t *B)\
{ return flatcc_builder_start_string(B); }\
static inline NS ## string_ref_t NS ## string_end(NS ## builder_t *B)\
{ return flatcc_builder_end_string(B); }\
static inline NS ## ref_t NS ## string_create(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_create_string(B, s, len); }\
static inline NS ## ref_t NS ## string_create_str(NS ## builder_t *B, const char *s)\
{ return flatcc_builder_create_string_str(B, s); }\
static inline NS ## ref_t NS ## string_create_strn(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_create_string_strn(B, s, len); }\
static inline NS ## string_ref_t NS ## string_clone(NS ## builder_t *B, NS ## string_t string)\
{ __flatbuffers_memoize(B, string, flatcc_builder_create_string(B, string, NS ## string_len(string))); }\
static inline NS ## string_ref_t NS ## string_slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ size_t n = NS ## string_len(string); if (index >= n) index = n; n -= index; if (len > n) len = n;\
return flatcc_builder_create_string(B, string + index, len); }\
__flatbuffers_build_string_ops(NS, NS ## string)\
__flatbuffers_build_offset_vector(NS, NS ## string)
#define __flatbuffers_copy_from_pe(P, P2, N) (*(P) = N ## _read_from_pe(P2), (P))
#define __flatbuffers_from_pe(P, N) (*(P) = N ## _read_from_pe(P), (P))
#define __flatbuffers_copy_to_pe(P, P2, N) (N ## _write_to_pe((P), *(P2)), (P))
#define __flatbuffers_to_pe(P, N) (N ## _write_to_pe((P), *(P)), (P))
#define __flatbuffers_define_fixed_array_primitives(NS, N, T)\
static inline T *N ## _array_copy(T *p, const T *p2, size_t n)\
{ memcpy(p, p2, n * sizeof(T)); return p; }\
static inline T *N ## _array_copy_from_pe(T *p, const T *p2, size_t n)\
{ size_t i; if (NS ## is_native_pe()) memcpy(p, p2, n * sizeof(T)); else\
for (i = 0; i < n; ++i) N ## _copy_from_pe(&p[i], &p2[i]); return p; }\
static inline T *N ## _array_copy_to_pe(T *p, const T *p2, size_t n)\
{ size_t i; if (NS ## is_native_pe()) memcpy(p, p2, n * sizeof(T)); else\
for (i = 0; i < n; ++i) N ## _copy_to_pe(&p[i], &p2[i]); return p; }
#define __flatbuffers_define_scalar_primitives(NS, N, T)\
static inline T *N ## _from_pe(T *p) { return __ ## NS ## from_pe(p, N); }\
static inline T *N ## _to_pe(T *p) { return __ ## NS ## to_pe(p, N); }\
static inline T *N ## _copy(T *p, const T *p2) { *p = *p2; return p; }\
static inline T *N ## _copy_from_pe(T *p, const T *p2)\
{ return __ ## NS ## copy_from_pe(p, p2, N); }\
static inline T *N ## _copy_to_pe(T *p, const T *p2) \
{ return __ ## NS ## copy_to_pe(p, p2, N); }\
static inline T *N ## _assign(T *p, const T v0) { *p = v0; return p; }\
static inline T *N ## _assign_from_pe(T *p, T v0)\
{ *p = N ## _read_from_pe(&v0); return p; }\
static inline T *N ## _assign_to_pe(T *p, T v0)\
{ N ## _write_to_pe(p, v0); return p; }
#define __flatbuffers_build_scalar(NS, N, T)\
__ ## NS ## define_scalar_primitives(NS, N, T)\
__ ## NS ## define_fixed_array_primitives(NS, N, T)\
__ ## NS ## build_vector(NS, N, T, sizeof(T), sizeof(T))
/* Depends on generated copy_to/from_pe functions, and the type. */
#define __flatbuffers_define_struct_primitives(NS, N)\
static inline N ## _t *N ##_to_pe(N ## _t *p)\
{ if (!NS ## is_native_pe()) { N ## _copy_to_pe(p, p); }; return p; }\
static inline N ## _t *N ##_from_pe(N ## _t *p)\
{ if (!NS ## is_native_pe()) { N ## _copy_from_pe(p, p); }; return p; }\
static inline N ## _t *N ## _clear(N ## _t *p) { return (N ## _t *)memset(p, 0, N ## __size()); }
/* Depends on generated copy/assign_to/from_pe functions, and the type. */
#define __flatbuffers_build_struct(NS, N, S, A, FID, TFID)\
__ ## NS ## define_struct_primitives(NS, N)\
typedef NS ## ref_t N ## _ref_t;\
static inline N ## _t *N ## _start(NS ## builder_t *B)\
{ return (N ## _t *)flatcc_builder_start_struct(B, S, A); }\
static inline N ## _ref_t N ## _end(NS ## builder_t *B)\
{ if (!NS ## is_native_pe()) { N ## _to_pe((N ## _t *)flatcc_builder_struct_edit(B)); }\
return flatcc_builder_end_struct(B); }\
static inline N ## _ref_t N ## _end_pe(NS ## builder_t *B)\
{ return flatcc_builder_end_struct(B); }\
static inline N ## _ref_t N ## _create(NS ## builder_t *B __ ## N ## _formal_args)\
{ N ## _t *_p = N ## _start(B); if (!_p) return 0; N ##_assign_to_pe(_p __ ## N ## _call_args);\
return N ## _end_pe(B); }\
static inline N ## _ref_t N ## _clone(NS ## builder_t *B, N ## _struct_t p)\
{ N ## _t *_p; __flatbuffers_memoize_begin(B, p); _p = N ## _start(B); if (!_p) return 0;\
N ## _copy(_p, p); __flatbuffers_memoize_end(B, p, N ##_end_pe(B)); }\
__flatbuffers_build_vector(NS, N, N ## _t, S, A)\
__flatbuffers_build_struct_root(NS, N, A, FID, TFID)\
#define __flatbuffers_struct_clear_field(p) memset((p), 0, sizeof(*(p)))
#define __flatbuffers_build_table(NS, N, K)\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_table(B, K); }\
static inline N ## _ref_t N ## _end(NS ## builder_t *B)\
{ FLATCC_ASSERT(flatcc_builder_check_required(B, __ ## N ## _required,\
sizeof(__ ## N ## _required) / sizeof(__ ## N ## _required[0]) - 1));\
return flatcc_builder_end_table(B); }\
__flatbuffers_build_offset_vector(NS, N)
#define __flatbuffers_build_table_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _ref_t ref)\
{ TN ## _ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ?\
((*_p = ref), 0) : -1; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return TN ## _start(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, TN ## _end(B)); }\
static inline TN ## _ref_t N ## _create(NS ## builder_t *B __ ## TN ##_formal_args)\
{ return N ## _add(B, TN ## _create(B __ ## TN ## _call_args)); }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _table_t p)\
{ return N ## _add(B, TN ## _clone(B, p)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _table_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }
#define __flatbuffers_build_union_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _union_ref_t uref)\
{ NS ## ref_t *_p; TN ## _union_type_t *_pt; if (uref.type == TN ## _NONE) return 0; if (uref.value == 0) return -1;\
if (!(_pt = (TN ## _union_type_t *)flatcc_builder_table_add(B, ID - 1, sizeof(*_pt), sizeof(*_pt)))) return -1;\
*_pt = uref.type; if (!(_p = flatcc_builder_table_add_offset(B, ID))) return -1; *_p = uref.value; return 0; }\
static inline int N ## _add_type(NS ## builder_t *B, TN ## _union_type_t type)\
{ TN ## _union_type_t *_pt; if (type == TN ## _NONE) return 0; return (_pt = (TN ## _union_type_t *)flatcc_builder_table_add(B, ID - 1,\
sizeof(*_pt), sizeof(*_pt))) ? ((*_pt = type), 0) : -1; }\
static inline int N ## _add_value(NS ## builder_t *B, TN ## _union_ref_t uref)\
{ NS ## ref_t *p; if (uref.type == TN ## _NONE) return 0; return (p = flatcc_builder_table_add_offset(B, ID)) ?\
((*p = uref.value), 0) : -1; }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _union_t p)\
{ return N ## _add(B, TN ## _clone(B, p)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _union_t _p = N ## _union(t); return _p.type ? N ## _clone(B, _p) : 0; }
/* M is the union value name and T is its type, i.e. the qualified name. */
#define __flatbuffers_build_union_table_value_field(NS, N, NU, M, T)\
static inline int N ## _ ## M ## _add(NS ## builder_t *B, T ## _ref_t ref)\
{ return N ## _add(B, NU ## _as_ ## M (ref)); }\
static inline int N ## _ ## M ## _start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline int N ## _ ## M ## _end(NS ## builder_t *B)\
{ T ## _ref_t ref = T ## _end(B);\
return ref ? N ## _ ## M ## _add(B, ref) : -1; }\
static inline int N ## _ ## M ## _create(NS ## builder_t *B __ ## T ##_formal_args)\
{ T ## _ref_t ref = T ## _create(B __ ## T ## _call_args);\
return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }\
static inline int N ## _ ## M ## _clone(NS ## builder_t *B, T ## _table_t t)\
{ T ## _ref_t ref = T ## _clone(B, t);\
return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }
/* M is the union value name and T is its type, i.e. the qualified name. */
#define __flatbuffers_build_union_struct_value_field(NS, N, NU, M, T)\
static inline int N ## _ ## M ## _add(NS ## builder_t *B, T ## _ref_t ref)\
{ return N ## _add(B, NU ## _as_ ## M (ref)); }\
static inline T ## _t *N ## _ ## M ## _start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline int N ## _ ## M ## _end(NS ## builder_t *B)\
{ T ## _ref_t ref = T ## _end(B);\
return ref ? N ## _ ## M ## _add(B, ref) : -1; }\
static inline int N ## _ ## M ## _create(NS ## builder_t *B __ ## T ##_formal_args)\
{ T ## _ref_t ref = T ## _create(B __ ## T ## _call_args);\
return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }\
static inline int N ## _ ## M ## _end_pe(NS ## builder_t *B)\
{ T ## _ref_t ref = T ## _end_pe(B);\
return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }\
static inline int N ## _ ## M ## _clone(NS ## builder_t *B, T ## _struct_t p)\
{ T ## _ref_t ref = T ## _clone(B, p);\
return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }
#define __flatbuffers_build_union_string_value_field(NS, N, NU, M)\
static inline int N ## _ ## M ## _add(NS ## builder_t *B, NS ## string_ref_t ref)\
{ return N ## _add(B, NU ## _as_ ## M (ref)); }\
__flatbuffers_build_string_field_ops(NS, N ## _ ## M)
/* NS: common namespace, ID: table field id (not offset), TN: name of type T, TT: name of table type
* S: sizeof of scalar type, A: alignment of type T, default value V of type T. */
#define __flatbuffers_build_scalar_field(ID, NS, N, TN, T, S, A, V, TT)\
static inline int N ## _add(NS ## builder_t *B, const T v)\
{ T *_p; if (v == V) return 0; if (!(_p = (T *)flatcc_builder_table_add(B, ID, S, A))) return -1;\
TN ## _assign_to_pe(_p, v); return 0; }\
static inline int N ## _force_add(NS ## builder_t *B, const T v)\
{ T *_p; if (!(_p = (T *)flatcc_builder_table_add(B, ID, S, A))) return -1;\
TN ## _assign_to_pe(_p, v); return 0; }\
/* Clone does not skip default values and expects pe endian content. */\
static inline int N ## _clone(NS ## builder_t *B, const T *p)\
{ return 0 == flatcc_builder_table_add_copy(B, ID, p, S, A) ? -1 : 0; }\
/* Transferring a missing field is a nop success with 0 as result. */\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ const T *_p = N ## _get_ptr(t); return _p ? N ## _clone(B, _p) : 0; }
/* NS: common namespace, ID: table field id (not offset), TN: name of type T, TT: name of table type
* S: sizeof of scalar type, A: alignment of type T. */
#define __flatbuffers_build_scalar_optional_field(ID, NS, N, TN, T, S, A, TT)\
static inline int N ## _add(NS ## builder_t *B, const T v)\
{ T *_p; if (!(_p = (T *)flatcc_builder_table_add(B, ID, S, A))) return -1;\
TN ## _assign_to_pe(_p, v); return 0; }\
/* Clone does not skip default values and expects pe endian content. */\
static inline int N ## _clone(NS ## builder_t *B, const T *p)\
{ return 0 == flatcc_builder_table_add_copy(B, ID, p, S, A) ? -1 : 0; }\
/* Transferring a missing field is a nop success with 0 as result. */\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ const T *_p = N ## _get_ptr(t); return _p ? N ## _clone(B, _p) : 0; }
#define __flatbuffers_build_struct_field(ID, NS, N, TN, S, A, TT)\
static inline TN ## _t *N ## _start(NS ## builder_t *B)\
{ return (TN ## _t *)flatcc_builder_table_add(B, ID, S, A); }\
static inline int N ## _end(NS ## builder_t *B)\
{ if (!NS ## is_native_pe()) { TN ## _to_pe((TN ## _t *)flatcc_builder_table_edit(B, S)); } return 0; }\
static inline int N ## _end_pe(NS ## builder_t *B) { return 0; }\
static inline int N ## _create(NS ## builder_t *B __ ## TN ## _formal_args)\
{ TN ## _t *_p = N ## _start(B); if (!_p) return -1; TN ##_assign_to_pe(_p __ ## TN ## _call_args);\
return 0; }\
static inline int N ## _add(NS ## builder_t *B, const TN ## _t *p)\
{ TN ## _t *_p = N ## _start(B); if (!_p) return -1; TN ##_copy_to_pe(_p, p); return 0; }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _struct_t p)\
{ return 0 == flatcc_builder_table_add_copy(B, ID, p, S, A) ? -1 : 0; }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _struct_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }
#define __flatbuffers_build_vector_field(ID, NS, N, TN, T, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _vec_ref_t ref)\
{ TN ## _vec_ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ? ((*_p = ref), 0) : -1; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return TN ## _vec_start(B); }\
static inline int N ## _end_pe(NS ## builder_t *B)\
{ return N ## _add(B, TN ## _vec_end_pe(B)); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, TN ## _vec_end(B)); }\
static inline int N ## _create_pe(NS ## builder_t *B, const T *data, size_t len)\
{ return N ## _add(B, TN ## _vec_create_pe(B, data, len)); }\
static inline int N ## _create(NS ## builder_t *B, const T *data, size_t len)\
{ return N ## _add(B, TN ## _vec_create(B, data, len)); }\
static inline int N ## _slice(NS ## builder_t *B, TN ## _vec_t vec, size_t index, size_t len)\
{ return N ## _add(B, TN ## _vec_slice(B, vec, index, len)); }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _vec_t vec)\
{ return N ## _add(B, TN ## _vec_clone(B, vec)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _vec_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }\
__flatbuffers_build_vector_ops(NS, N, N, TN, T)\
#define __flatbuffers_build_offset_vector_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _vec_ref_t ref)\
{ TN ## _vec_ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ? ((*_p = ref), 0) : -1; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_offset_vector(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, flatcc_builder_end_offset_vector(B)); }\
static inline int N ## _create(NS ## builder_t *B, const TN ## _ref_t *data, size_t len)\
{ return N ## _add(B, flatcc_builder_create_offset_vector(B, data, len)); }\
__flatbuffers_build_offset_vector_ops(NS, N, N, TN)\
static inline int N ## _clone(NS ## builder_t *B, TN ## _vec_t vec)\
{ return N ## _add(B, TN ## _vec_clone(B, vec)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _vec_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }
/* depends on N ## _add which differs for union member fields and ordinary fields */\
#define __flatbuffers_build_string_field_ops(NS, N)\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_string(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, flatcc_builder_end_string(B)); }\
static inline int N ## _create(NS ## builder_t *B, const char *s, size_t len)\
{ return N ## _add(B, flatcc_builder_create_string(B, s, len)); }\
static inline int N ## _create_str(NS ## builder_t *B, const char *s)\
{ return N ## _add(B, flatcc_builder_create_string_str(B, s)); }\
static inline int N ## _create_strn(NS ## builder_t *B, const char *s, size_t max_len)\
{ return N ## _add(B, flatcc_builder_create_string_strn(B, s, max_len)); }\
static inline int N ## _clone(NS ## builder_t *B, NS ## string_t string)\
{ return N ## _add(B, NS ## string_clone(B, string)); }\
static inline int N ## _slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ return N ## _add(B, NS ## string_slice(B, string, index, len)); }\
__flatbuffers_build_string_ops(NS, N)
#define __flatbuffers_build_string_field(ID, NS, N, TT)\
static inline int N ## _add(NS ## builder_t *B, NS ## string_ref_t ref)\
{ NS ## string_ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ? ((*_p = ref), 0) : -1; }\
__flatbuffers_build_string_field_ops(NS, N)\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ NS ## string_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }
#define __flatbuffers_build_table_vector_field(ID, NS, N, TN, TT)\
__flatbuffers_build_offset_vector_field(ID, NS, N, TN, TT)\
__flatbuffers_build_table_vector_ops(NS, N, TN)
#define __flatbuffers_build_union_vector_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _union_vec_ref_t uvref)\
{ NS ## vec_ref_t *_p; if (!uvref.type || !uvref.value) return uvref.type == uvref.value ? 0 : -1;\
if (!(_p = flatcc_builder_table_add_offset(B, ID - 1))) return -1; *_p = uvref.type;\
if (!(_p = flatcc_builder_table_add_offset(B, ID))) return -1; *_p = uvref.value; return 0; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_union_vector(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, flatcc_builder_end_union_vector(B)); }\
static inline int N ## _create(NS ## builder_t *B, const TN ## _union_ref_t *data, size_t len)\
{ return N ## _add(B, flatcc_builder_create_union_vector(B, data, len)); }\
__flatbuffers_build_union_vector_ops(NS, N, N, TN)\
static inline int N ## _clone(NS ## builder_t *B, TN ## _union_vec_t vec)\
{ return N ## _add(B, TN ## _vec_clone(B, vec)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _union_vec_t _p = N ## _union(t); return _p.type ? N ## _clone(B, _p) : 0; }
#define __flatbuffers_build_union_table_vector_value_field(NS, N, NU, M, T)\
static inline int N ## _ ## M ## _push_start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_end(NS ## builder_t *B)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (T ## _end(B))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push(NS ## builder_t *B, T ## _ref_t ref)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (ref)); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create(NS ## builder_t *B __ ## T ##_formal_args)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _create(B __ ## T ## _call_args))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_clone(NS ## builder_t *B, T ## _table_t t)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _clone(B, t))); }
#define __flatbuffers_build_union_struct_vector_value_field(NS, N, NU, M, T)\
static inline T ## _t *N ## _ ## M ## _push_start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_end(NS ## builder_t *B)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (T ## _end(B))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push(NS ## builder_t *B, T ## _ref_t ref)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (ref)); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create(NS ## builder_t *B __ ## T ##_formal_args)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _create(B __ ## T ## _call_args))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_clone(NS ## builder_t *B, T ## _struct_t p)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _clone(B, p))); }
#define __flatbuffers_build_union_string_vector_value_field(NS, N, NU, M)\
static inline NU ## _union_ref_t *N ## _ ## M ## _push(NS ## builder_t *B, NS ## string_ref_t ref)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (ref)); }\
static inline int N ## _ ## M ## _push_start(NS ## builder_t *B)\
{ return NS ## string_start(B); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_end(NS ## builder_t *B)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_end(B))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create(NS ## builder_t *B, const char *s, size_t len)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_create(B, s, len))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create_str(NS ## builder_t *B, const char *s)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_create_str(B, s))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create_strn(NS ## builder_t *B, const char *s, size_t max_len)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_create_strn(B, s, max_len))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_clone(NS ## builder_t *B, NS ## string_t string)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_clone(B, string))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_slice(B, string, index, len))); }
#define __flatbuffers_build_string_vector_field(ID, NS, N, TT)\
__flatbuffers_build_offset_vector_field(ID, NS, N, NS ## string, TT)\
__flatbuffers_build_string_vector_ops(NS, N)
#define __flatbuffers_char_formal_args , char v0
#define __flatbuffers_char_call_args , v0
#define __flatbuffers_uint8_formal_args , uint8_t v0
#define __flatbuffers_uint8_call_args , v0
#define __flatbuffers_int8_formal_args , int8_t v0
#define __flatbuffers_int8_call_args , v0
#define __flatbuffers_bool_formal_args , flatbuffers_bool_t v0
#define __flatbuffers_bool_call_args , v0
#define __flatbuffers_uint16_formal_args , uint16_t v0
#define __flatbuffers_uint16_call_args , v0
#define __flatbuffers_uint32_formal_args , uint32_t v0
#define __flatbuffers_uint32_call_args , v0
#define __flatbuffers_uint64_formal_args , uint64_t v0
#define __flatbuffers_uint64_call_args , v0
#define __flatbuffers_int16_formal_args , int16_t v0
#define __flatbuffers_int16_call_args , v0
#define __flatbuffers_int32_formal_args , int32_t v0
#define __flatbuffers_int32_call_args , v0
#define __flatbuffers_int64_formal_args , int64_t v0
#define __flatbuffers_int64_call_args , v0
#define __flatbuffers_float_formal_args , float v0
#define __flatbuffers_float_call_args , v0
#define __flatbuffers_double_formal_args , double v0
#define __flatbuffers_double_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_char, char)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint8, uint8_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int8, int8_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_bool, flatbuffers_bool_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint16, uint16_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint32, uint32_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint64, uint64_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int16, int16_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int32, int32_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int64, int64_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_float, float)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_double, double)
__flatbuffers_build_string(flatbuffers_)
__flatbuffers_build_buffer(flatbuffers_)
#include "flatcc/flatcc_epilogue.h"
#endif /* FLATBUFFERS_COMMON_BUILDER_H */
#ifndef SCHEMA_READER_H
#define SCHEMA_READER_H
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */
#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif
typedef struct org_apache_arrow_flatbuf_Buffer org_apache_arrow_flatbuf_Buffer_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_struct_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_vec_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_table_t;
typedef struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__table_t;
typedef struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_table_t;
typedef struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_table_t;
typedef struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_table_t;
typedef struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_table_t;
typedef struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_table_t;
typedef struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_table_t;
typedef struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_table_t;
typedef struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_table_t;
typedef struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_table_t;
typedef struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_table_t;
typedef struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_table_t;
typedef struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_table_t;
typedef struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_table_t;
typedef struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_table_t;
typedef struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_table_t;
typedef struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_table_t;
typedef struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_table_t;
typedef struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_table_t;
typedef struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_table_t;
typedef struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_table_t;
typedef struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_table_t;
typedef struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_Null_file_identifier
#define org_apache_arrow_flatbuf_Null_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Null_file_identifier */
#ifndef org_apache_arrow_flatbuf_Null_identifier
#define org_apache_arrow_flatbuf_Null_identifier 0
#endif
#define org_apache_arrow_flatbuf_Null_type_hash ((flatbuffers_thash_t)0x7b36a4dd)
#define org_apache_arrow_flatbuf_Null_type_identifier "\xdd\xa4\x36\x7b"
#ifndef org_apache_arrow_flatbuf_Null_file_extension
#define org_apache_arrow_flatbuf_Null_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Struct__file_identifier
#define org_apache_arrow_flatbuf_Struct__file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Struct__file_identifier */
#ifndef org_apache_arrow_flatbuf_Struct__identifier
#define org_apache_arrow_flatbuf_Struct__identifier 0
#endif
#define org_apache_arrow_flatbuf_Struct__type_hash ((flatbuffers_thash_t)0x6310f362)
#define org_apache_arrow_flatbuf_Struct__type_identifier "\x62\xf3\x10\x63"
#ifndef org_apache_arrow_flatbuf_Struct__file_extension
#define org_apache_arrow_flatbuf_Struct__file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_List_file_identifier
#define org_apache_arrow_flatbuf_List_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_List_file_identifier */
#ifndef org_apache_arrow_flatbuf_List_identifier
#define org_apache_arrow_flatbuf_List_identifier 0
#endif
#define org_apache_arrow_flatbuf_List_type_hash ((flatbuffers_thash_t)0xd4ce5878)
#define org_apache_arrow_flatbuf_List_type_identifier "\x78\x58\xce\xd4"
#ifndef org_apache_arrow_flatbuf_List_file_extension
#define org_apache_arrow_flatbuf_List_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeList_file_identifier
#define org_apache_arrow_flatbuf_LargeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeList_identifier
#define org_apache_arrow_flatbuf_LargeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeList_type_hash ((flatbuffers_thash_t)0x38aa7e27)
#define org_apache_arrow_flatbuf_LargeList_type_identifier "\x27\x7e\xaa\x38"
#ifndef org_apache_arrow_flatbuf_LargeList_file_extension
#define org_apache_arrow_flatbuf_LargeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeList_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeList_type_hash ((flatbuffers_thash_t)0xcef245bb)
#define org_apache_arrow_flatbuf_FixedSizeList_type_identifier "\xbb\x45\xf2\xce"
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_extension
#define org_apache_arrow_flatbuf_FixedSizeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Map_file_identifier
#define org_apache_arrow_flatbuf_Map_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Map_file_identifier */
#ifndef org_apache_arrow_flatbuf_Map_identifier
#define org_apache_arrow_flatbuf_Map_identifier 0
#endif
#define org_apache_arrow_flatbuf_Map_type_hash ((flatbuffers_thash_t)0xcebef8e6)
#define org_apache_arrow_flatbuf_Map_type_identifier "\xe6\xf8\xbe\xce"
#ifndef org_apache_arrow_flatbuf_Map_file_extension
#define org_apache_arrow_flatbuf_Map_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Union_file_identifier
#define org_apache_arrow_flatbuf_Union_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Union_file_identifier */
#ifndef org_apache_arrow_flatbuf_Union_identifier
#define org_apache_arrow_flatbuf_Union_identifier 0
#endif
#define org_apache_arrow_flatbuf_Union_type_hash ((flatbuffers_thash_t)0x896bda57)
#define org_apache_arrow_flatbuf_Union_type_identifier "\x57\xda\x6b\x89"
#ifndef org_apache_arrow_flatbuf_Union_file_extension
#define org_apache_arrow_flatbuf_Union_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Int_file_identifier
#define org_apache_arrow_flatbuf_Int_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Int_file_identifier */
#ifndef org_apache_arrow_flatbuf_Int_identifier
#define org_apache_arrow_flatbuf_Int_identifier 0
#endif
#define org_apache_arrow_flatbuf_Int_type_hash ((flatbuffers_thash_t)0x30789001)
#define org_apache_arrow_flatbuf_Int_type_identifier "\x01\x90\x78\x30"
#ifndef org_apache_arrow_flatbuf_Int_file_extension
#define org_apache_arrow_flatbuf_Int_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FloatingPoint_file_identifier */
#ifndef org_apache_arrow_flatbuf_FloatingPoint_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_identifier 0
#endif
#define org_apache_arrow_flatbuf_FloatingPoint_type_hash ((flatbuffers_thash_t)0xf7d06268)
#define org_apache_arrow_flatbuf_FloatingPoint_type_identifier "\x68\x62\xd0\xf7"
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_extension
#define org_apache_arrow_flatbuf_FloatingPoint_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Utf8_file_identifier
#define org_apache_arrow_flatbuf_Utf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Utf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_Utf8_identifier
#define org_apache_arrow_flatbuf_Utf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_Utf8_type_hash ((flatbuffers_thash_t)0x8fe60d37)
#define org_apache_arrow_flatbuf_Utf8_type_identifier "\x37\x0d\xe6\x8f"
#ifndef org_apache_arrow_flatbuf_Utf8_file_extension
#define org_apache_arrow_flatbuf_Utf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Binary_file_identifier
#define org_apache_arrow_flatbuf_Binary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Binary_file_identifier */
#ifndef org_apache_arrow_flatbuf_Binary_identifier
#define org_apache_arrow_flatbuf_Binary_identifier 0
#endif
#define org_apache_arrow_flatbuf_Binary_type_hash ((flatbuffers_thash_t)0x8e21a795)
#define org_apache_arrow_flatbuf_Binary_type_identifier "\x95\xa7\x21\x8e"
#ifndef org_apache_arrow_flatbuf_Binary_file_extension
#define org_apache_arrow_flatbuf_Binary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeUtf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeUtf8_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeUtf8_type_hash ((flatbuffers_thash_t)0x24ed2fb0)
#define org_apache_arrow_flatbuf_LargeUtf8_type_identifier "\xb0\x2f\xed\x24"
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_extension
#define org_apache_arrow_flatbuf_LargeUtf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_identifier
#define org_apache_arrow_flatbuf_LargeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeBinary_identifier
#define org_apache_arrow_flatbuf_LargeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeBinary_type_hash ((flatbuffers_thash_t)0xbd437872)
#define org_apache_arrow_flatbuf_LargeBinary_type_identifier "\x72\x78\x43\xbd"
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_extension
#define org_apache_arrow_flatbuf_LargeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_hash ((flatbuffers_thash_t)0x80d0f4ce)
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier "\xce\xf4\xd0\x80"
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_extension
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Bool_file_identifier
#define org_apache_arrow_flatbuf_Bool_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Bool_file_identifier */
#ifndef org_apache_arrow_flatbuf_Bool_identifier
#define org_apache_arrow_flatbuf_Bool_identifier 0
#endif
#define org_apache_arrow_flatbuf_Bool_type_hash ((flatbuffers_thash_t)0x96bf83f0)
#define org_apache_arrow_flatbuf_Bool_type_identifier "\xf0\x83\xbf\x96"
#ifndef org_apache_arrow_flatbuf_Bool_file_extension
#define org_apache_arrow_flatbuf_Bool_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_RunEndEncoded_file_identifier */
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_identifier 0
#endif
#define org_apache_arrow_flatbuf_RunEndEncoded_type_hash ((flatbuffers_thash_t)0x5a98bcc)
#define org_apache_arrow_flatbuf_RunEndEncoded_type_identifier "\xcc\x8b\xa9\x05"
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_extension
#define org_apache_arrow_flatbuf_RunEndEncoded_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Decimal_file_identifier
#define org_apache_arrow_flatbuf_Decimal_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Decimal_file_identifier */
#ifndef org_apache_arrow_flatbuf_Decimal_identifier
#define org_apache_arrow_flatbuf_Decimal_identifier 0
#endif
#define org_apache_arrow_flatbuf_Decimal_type_hash ((flatbuffers_thash_t)0x91d1beb7)
#define org_apache_arrow_flatbuf_Decimal_type_identifier "\xb7\xbe\xd1\x91"
#ifndef org_apache_arrow_flatbuf_Decimal_file_extension
#define org_apache_arrow_flatbuf_Decimal_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Date_file_identifier
#define org_apache_arrow_flatbuf_Date_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Date_file_identifier */
#ifndef org_apache_arrow_flatbuf_Date_identifier
#define org_apache_arrow_flatbuf_Date_identifier 0
#endif
#define org_apache_arrow_flatbuf_Date_type_hash ((flatbuffers_thash_t)0xe0ccf624)
#define org_apache_arrow_flatbuf_Date_type_identifier "\x24\xf6\xcc\xe0"
#ifndef org_apache_arrow_flatbuf_Date_file_extension
#define org_apache_arrow_flatbuf_Date_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Time_file_identifier
#define org_apache_arrow_flatbuf_Time_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Time_file_identifier */
#ifndef org_apache_arrow_flatbuf_Time_identifier
#define org_apache_arrow_flatbuf_Time_identifier 0
#endif
#define org_apache_arrow_flatbuf_Time_type_hash ((flatbuffers_thash_t)0x2442a489)
#define org_apache_arrow_flatbuf_Time_type_identifier "\x89\xa4\x42\x24"
#ifndef org_apache_arrow_flatbuf_Time_file_extension
#define org_apache_arrow_flatbuf_Time_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Timestamp_file_identifier
#define org_apache_arrow_flatbuf_Timestamp_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Timestamp_file_identifier */
#ifndef org_apache_arrow_flatbuf_Timestamp_identifier
#define org_apache_arrow_flatbuf_Timestamp_identifier 0
#endif
#define org_apache_arrow_flatbuf_Timestamp_type_hash ((flatbuffers_thash_t)0x1fddf080)
#define org_apache_arrow_flatbuf_Timestamp_type_identifier "\x80\xf0\xdd\x1f"
#ifndef org_apache_arrow_flatbuf_Timestamp_file_extension
#define org_apache_arrow_flatbuf_Timestamp_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Interval_file_identifier
#define org_apache_arrow_flatbuf_Interval_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Interval_file_identifier */
#ifndef org_apache_arrow_flatbuf_Interval_identifier
#define org_apache_arrow_flatbuf_Interval_identifier 0
#endif
#define org_apache_arrow_flatbuf_Interval_type_hash ((flatbuffers_thash_t)0x1e2d6809)
#define org_apache_arrow_flatbuf_Interval_type_identifier "\x09\x68\x2d\x1e"
#ifndef org_apache_arrow_flatbuf_Interval_file_extension
#define org_apache_arrow_flatbuf_Interval_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Duration_file_identifier
#define org_apache_arrow_flatbuf_Duration_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Duration_file_identifier */
#ifndef org_apache_arrow_flatbuf_Duration_identifier
#define org_apache_arrow_flatbuf_Duration_identifier 0
#endif
#define org_apache_arrow_flatbuf_Duration_type_hash ((flatbuffers_thash_t)0x1ecea6b0)
#define org_apache_arrow_flatbuf_Duration_type_identifier "\xb0\xa6\xce\x1e"
#ifndef org_apache_arrow_flatbuf_Duration_file_extension
#define org_apache_arrow_flatbuf_Duration_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_KeyValue_file_identifier
#define org_apache_arrow_flatbuf_KeyValue_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_KeyValue_file_identifier */
#ifndef org_apache_arrow_flatbuf_KeyValue_identifier
#define org_apache_arrow_flatbuf_KeyValue_identifier 0
#endif
#define org_apache_arrow_flatbuf_KeyValue_type_hash ((flatbuffers_thash_t)0x3b264744)
#define org_apache_arrow_flatbuf_KeyValue_type_identifier "\x44\x47\x26\x3b"
#ifndef org_apache_arrow_flatbuf_KeyValue_file_extension
#define org_apache_arrow_flatbuf_KeyValue_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier */
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_identifier 0
#endif
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_hash ((flatbuffers_thash_t)0x8c703261)
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier "\x61\x32\x70\x8c"
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_extension
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Field_file_identifier
#define org_apache_arrow_flatbuf_Field_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Field_file_identifier */
#ifndef org_apache_arrow_flatbuf_Field_identifier
#define org_apache_arrow_flatbuf_Field_identifier 0
#endif
#define org_apache_arrow_flatbuf_Field_type_hash ((flatbuffers_thash_t)0xd981525c)
#define org_apache_arrow_flatbuf_Field_type_identifier "\x5c\x52\x81\xd9"
#ifndef org_apache_arrow_flatbuf_Field_file_extension
#define org_apache_arrow_flatbuf_Field_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Buffer_file_identifier
#define org_apache_arrow_flatbuf_Buffer_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Buffer_file_identifier */
#ifndef org_apache_arrow_flatbuf_Buffer_identifier
#define org_apache_arrow_flatbuf_Buffer_identifier 0
#endif
#define org_apache_arrow_flatbuf_Buffer_type_hash ((flatbuffers_thash_t)0x519d7fea)
#define org_apache_arrow_flatbuf_Buffer_type_identifier "\xea\x7f\x9d\x51"
#ifndef org_apache_arrow_flatbuf_Buffer_file_extension
#define org_apache_arrow_flatbuf_Buffer_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Schema_file_identifier
#define org_apache_arrow_flatbuf_Schema_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Schema_file_identifier */
#ifndef org_apache_arrow_flatbuf_Schema_identifier
#define org_apache_arrow_flatbuf_Schema_identifier 0
#endif
#define org_apache_arrow_flatbuf_Schema_type_hash ((flatbuffers_thash_t)0x406570b)
#define org_apache_arrow_flatbuf_Schema_type_identifier "\x0b\x57\x06\x04"
#ifndef org_apache_arrow_flatbuf_Schema_file_extension
#define org_apache_arrow_flatbuf_Schema_file_extension "bin"
#endif
typedef int16_t org_apache_arrow_flatbuf_MetadataVersion_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 16)
/** 0.1.0 (October 2016). */
#define org_apache_arrow_flatbuf_MetadataVersion_V1 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_MetadataVersion_V2 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_MetadataVersion_V3 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_MetadataVersion_V4 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(3))
#define org_apache_arrow_flatbuf_MetadataVersion_V5 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(4))
static inline const char *org_apache_arrow_flatbuf_MetadataVersion_name(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_MetadataVersion_V1: return "V1";
case org_apache_arrow_flatbuf_MetadataVersion_V2: return "V2";
case org_apache_arrow_flatbuf_MetadataVersion_V3: return "V3";
case org_apache_arrow_flatbuf_MetadataVersion_V4: return "V4";
case org_apache_arrow_flatbuf_MetadataVersion_V5: return "V5";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_MetadataVersion_is_known_value(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_MetadataVersion_V1: return 1;
case org_apache_arrow_flatbuf_MetadataVersion_V2: return 1;
case org_apache_arrow_flatbuf_MetadataVersion_V3: return 1;
case org_apache_arrow_flatbuf_MetadataVersion_V4: return 1;
case org_apache_arrow_flatbuf_MetadataVersion_V5: return 1;
default: return 0;
}
}
/** Represents Arrow Features that might not have full support
* within implementations. This is intended to be used in
* two scenarios:
* 1. A mechanism for readers of Arrow Streams
* and files to understand that the stream or file makes
* use of a feature that isn't supported or unknown to
* the implementation (and therefore can meet the Arrow
* forward compatibility guarantees).
* 2. A means of negotiating between a client and server
* what features a stream is allowed to use. The enums
* values here are intented to represent higher level
* features, additional details maybe negotiated
* with key-value pairs specific to the protocol.
*
* Enums added to this list should be assigned power-of-two values
* to facilitate exchanging and comparing bitmaps for supported
* features. */
typedef int64_t org_apache_arrow_flatbuf_Feature_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, 64)
/** Needed to make flatbuffers happy. */
#define org_apache_arrow_flatbuf_Feature_UNUSED ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(0))
#define org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(1))
#define org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(2))
static inline const char *org_apache_arrow_flatbuf_Feature_name(org_apache_arrow_flatbuf_Feature_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_Feature_UNUSED: return "UNUSED";
case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return "DICTIONARY_REPLACEMENT";
case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return "COMPRESSED_BODY";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_Feature_is_known_value(org_apache_arrow_flatbuf_Feature_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_Feature_UNUSED: return 1;
case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return 1;
case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return 1;
default: return 0;
}
}
typedef int16_t org_apache_arrow_flatbuf_UnionMode_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 16)
#define org_apache_arrow_flatbuf_UnionMode_Sparse ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_UnionMode_Dense ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(1))
static inline const char *org_apache_arrow_flatbuf_UnionMode_name(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_UnionMode_Sparse: return "Sparse";
case org_apache_arrow_flatbuf_UnionMode_Dense: return "Dense";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_UnionMode_is_known_value(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_UnionMode_Sparse: return 1;
case org_apache_arrow_flatbuf_UnionMode_Dense: return 1;
default: return 0;
}
}
typedef int16_t org_apache_arrow_flatbuf_Precision_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 16)
#define org_apache_arrow_flatbuf_Precision_HALF ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Precision_SINGLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_Precision_DOUBLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(2))
static inline const char *org_apache_arrow_flatbuf_Precision_name(org_apache_arrow_flatbuf_Precision_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_Precision_HALF: return "HALF";
case org_apache_arrow_flatbuf_Precision_SINGLE: return "SINGLE";
case org_apache_arrow_flatbuf_Precision_DOUBLE: return "DOUBLE";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_Precision_is_known_value(org_apache_arrow_flatbuf_Precision_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_Precision_HALF: return 1;
case org_apache_arrow_flatbuf_Precision_SINGLE: return 1;
case org_apache_arrow_flatbuf_Precision_DOUBLE: return 1;
default: return 0;
}
}
typedef int16_t org_apache_arrow_flatbuf_DateUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_DateUnit_DAY ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_DateUnit_MILLISECOND ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(1))
static inline const char *org_apache_arrow_flatbuf_DateUnit_name(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_DateUnit_DAY: return "DAY";
case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return "MILLISECOND";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_DateUnit_is_known_value(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_DateUnit_DAY: return 1;
case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return 1;
default: return 0;
}
}
typedef int16_t org_apache_arrow_flatbuf_TimeUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_TimeUnit_SECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_TimeUnit_MILLISECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_TimeUnit_MICROSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_TimeUnit_NANOSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(3))
static inline const char *org_apache_arrow_flatbuf_TimeUnit_name(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_TimeUnit_SECOND: return "SECOND";
case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return "MILLISECOND";
case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return "MICROSECOND";
case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return "NANOSECOND";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_TimeUnit_is_known_value(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_TimeUnit_SECOND: return 1;
case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return 1;
case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return 1;
case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return 1;
default: return 0;
}
}
typedef int16_t org_apache_arrow_flatbuf_IntervalUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(2))
static inline const char *org_apache_arrow_flatbuf_IntervalUnit_name(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return "YEAR_MONTH";
case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return "DAY_TIME";
case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return "MONTH_DAY_NANO";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_IntervalUnit_is_known_value(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return 1;
case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return 1;
case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return 1;
default: return 0;
}
}
/** ----------------------------------------------------------------------
* Dictionary encoding metadata
* Maintained for forwards compatibility, in the future
* Dictionaries might be explicit maps between integers and values
* allowing for non-contiguous index values */
typedef int16_t org_apache_arrow_flatbuf_DictionaryKind_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 16)
#define org_apache_arrow_flatbuf_DictionaryKind_DenseArray ((org_apache_arrow_flatbuf_DictionaryKind_enum_t)INT16_C(0))
static inline const char *org_apache_arrow_flatbuf_DictionaryKind_name(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return "DenseArray";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_DictionaryKind_is_known_value(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return 1;
default: return 0;
}
}
/** ----------------------------------------------------------------------
* Endianness of the platform producing the data */
typedef int16_t org_apache_arrow_flatbuf_Endianness_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 16)
#define org_apache_arrow_flatbuf_Endianness_Little ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Endianness_Big ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(1))
static inline const char *org_apache_arrow_flatbuf_Endianness_name(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_Endianness_Little: return "Little";
case org_apache_arrow_flatbuf_Endianness_Big: return "Big";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_Endianness_is_known_value(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
switch (value) {
case org_apache_arrow_flatbuf_Endianness_Little: return 1;
case org_apache_arrow_flatbuf_Endianness_Big: return 1;
default: return 0;
}
}
/** ----------------------------------------------------------------------
* A Buffer represents a single contiguous memory segment */
struct org_apache_arrow_flatbuf_Buffer {
/** The relative offset into the shared memory page where the bytes for this
* buffer starts */
alignas(8) int64_t offset;
/** The absolute length (in bytes) of the memory buffer. The memory is found
* from offset (inclusive) to offset + length (non-inclusive). When building
* messages using the encapsulated IPC message, padding bytes may be written
* after a buffer, but such padding bytes do not need to be accounted for in
* the size here. */
alignas(8) int64_t length;
};
static_assert(sizeof(org_apache_arrow_flatbuf_Buffer_t) == 16, "struct size mismatch");
static inline const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__const_ptr_add(const org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__ptr_add(org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_struct_t org_apache_arrow_flatbuf_Buffer_vec_at(org_apache_arrow_flatbuf_Buffer_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_Buffer__size(void) { return 16; }
static inline size_t org_apache_arrow_flatbuf_Buffer_vec_len(org_apache_arrow_flatbuf_Buffer_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_Buffer)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, offset, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, length, flatbuffers_int64, int64_t)
/** These are stored in the flatbuffer in the Type union below */
struct org_apache_arrow_flatbuf_Null_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Null_vec_len(org_apache_arrow_flatbuf_Null_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Null_table_t org_apache_arrow_flatbuf_Null_vec_at(org_apache_arrow_flatbuf_Null_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Null_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Null)
/** A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
* (according to the physical memory layout). We used Struct_ here as
* Struct is a reserved word in Flatbuffers */
struct org_apache_arrow_flatbuf_Struct__table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Struct__vec_len(org_apache_arrow_flatbuf_Struct__vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Struct__table_t org_apache_arrow_flatbuf_Struct__vec_at(org_apache_arrow_flatbuf_Struct__vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Struct__table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Struct_)
struct org_apache_arrow_flatbuf_List_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_List_vec_len(org_apache_arrow_flatbuf_List_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_List_table_t org_apache_arrow_flatbuf_List_vec_at(org_apache_arrow_flatbuf_List_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_List_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_List)
/** Same as List, but with 64-bit offsets, allowing to represent
* extremely large data values. */
struct org_apache_arrow_flatbuf_LargeList_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_LargeList_vec_len(org_apache_arrow_flatbuf_LargeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeList_table_t org_apache_arrow_flatbuf_LargeList_vec_at(org_apache_arrow_flatbuf_LargeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeList)
struct org_apache_arrow_flatbuf_FixedSizeList_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_FixedSizeList_vec_len(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeList_table_t org_apache_arrow_flatbuf_FixedSizeList_vec_at(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeList)
/** Number of list items per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeList, listSize, flatbuffers_int32, int32_t, INT32_C(0))
/** A Map is a logical nested type that is represented as
*
* List<entries: Struct<key: K, value: V>>
*
* In this layout, the keys and values are each respectively contiguous. We do
* not constrain the key and value types, so the application is responsible
* for ensuring that the keys are hashable and unique. Whether the keys are sorted
* may be set in the metadata for this field.
*
* In a field with Map type, the field has a child Struct field, which then
* has two children: key type and the second the value type. The names of the
* child fields may be respectively "entries", "key", and "value", but this is
* not enforced.
*
* Map
* ```text
* - child[0] entries: Struct
* - child[0] key: K
* - child[1] value: V
* ```
* Neither the "entries" field nor the "key" field may be nullable.
*
* The metadata is structured so that Arrow systems without special handling
* for Map can make Map an alias for List. The "layout" attribute for the Map
* field must have the same contents as a List. */
struct org_apache_arrow_flatbuf_Map_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Map_vec_len(org_apache_arrow_flatbuf_Map_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Map_table_t org_apache_arrow_flatbuf_Map_vec_at(org_apache_arrow_flatbuf_Map_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Map_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Map)
/** Set to true if the keys within each value are sorted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Map, keysSorted, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
/** A union is a complex type with children in Field
* By default ids in the type vector refer to the offsets in the children
* optionally typeIds provides an indirection between the child offset and the type id
* for each child `typeIds[offset]` is the id used in the type vector */
struct org_apache_arrow_flatbuf_Union_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Union_vec_len(org_apache_arrow_flatbuf_Union_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Union_table_t org_apache_arrow_flatbuf_Union_vec_at(org_apache_arrow_flatbuf_Union_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Union_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Union)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Union, mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Union, typeIds, flatbuffers_int32_vec_t, 0)
struct org_apache_arrow_flatbuf_Int_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Int_vec_len(org_apache_arrow_flatbuf_Int_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Int_table_t org_apache_arrow_flatbuf_Int_vec_at(org_apache_arrow_flatbuf_Int_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Int_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Int)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Int, bitWidth, flatbuffers_int32, int32_t, INT32_C(0))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Int, is_signed, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
struct org_apache_arrow_flatbuf_FloatingPoint_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_FloatingPoint_vec_len(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FloatingPoint_table_t org_apache_arrow_flatbuf_FloatingPoint_vec_at(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FloatingPoint_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FloatingPoint, precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, INT16_C(0))
/** Unicode with UTF-8 encoding */
struct org_apache_arrow_flatbuf_Utf8_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Utf8_vec_len(org_apache_arrow_flatbuf_Utf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Utf8_table_t org_apache_arrow_flatbuf_Utf8_vec_at(org_apache_arrow_flatbuf_Utf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Utf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Utf8)
/** Opaque binary data */
struct org_apache_arrow_flatbuf_Binary_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Binary_vec_len(org_apache_arrow_flatbuf_Binary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Binary_table_t org_apache_arrow_flatbuf_Binary_vec_at(org_apache_arrow_flatbuf_Binary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Binary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Binary)
/** Same as Utf8, but with 64-bit offsets, allowing to represent
* extremely large data values. */
struct org_apache_arrow_flatbuf_LargeUtf8_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_LargeUtf8_vec_len(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeUtf8_table_t org_apache_arrow_flatbuf_LargeUtf8_vec_at(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeUtf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeUtf8)
/** Same as Binary, but with 64-bit offsets, allowing to represent
* extremely large data values. */
struct org_apache_arrow_flatbuf_LargeBinary_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_LargeBinary_vec_len(org_apache_arrow_flatbuf_LargeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeBinary_table_t org_apache_arrow_flatbuf_LargeBinary_vec_at(org_apache_arrow_flatbuf_LargeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeBinary)
struct org_apache_arrow_flatbuf_FixedSizeBinary_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_len(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeBinary_table_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeBinary)
/** Number of bytes per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeBinary, byteWidth, flatbuffers_int32, int32_t, INT32_C(0))
struct org_apache_arrow_flatbuf_Bool_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Bool_vec_len(org_apache_arrow_flatbuf_Bool_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Bool_table_t org_apache_arrow_flatbuf_Bool_vec_at(org_apache_arrow_flatbuf_Bool_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Bool_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Bool)
/** Contains two child arrays, run_ends and values.
* The run_ends child array must be a 16/32/64-bit integer array
* which encodes the indices at which the run with the value in
* each corresponding index in the values child array ends.
* Like list/struct types, the value array can be of any type. */
struct org_apache_arrow_flatbuf_RunEndEncoded_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_RunEndEncoded_vec_len(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_RunEndEncoded_table_t org_apache_arrow_flatbuf_RunEndEncoded_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_RunEndEncoded)
/** Exact decimal value represented as an integer value in two's
* complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
* are used. The representation uses the endianness indicated
* in the Schema. */
struct org_apache_arrow_flatbuf_Decimal_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Decimal_vec_len(org_apache_arrow_flatbuf_Decimal_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Decimal_table_t org_apache_arrow_flatbuf_Decimal_vec_at(org_apache_arrow_flatbuf_Decimal_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Decimal_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Decimal)
/** Total number of decimal digits */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Decimal, precision, flatbuffers_int32, int32_t, INT32_C(0))
/** Number of digits after the decimal point "." */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Decimal, scale, flatbuffers_int32, int32_t, INT32_C(0))
/** Number of bits per value. The only accepted widths are 128 and 256.
* We use bitWidth for consistency with Int::bitWidth. */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_Decimal, bitWidth, flatbuffers_int32, int32_t, INT32_C(128))
/** Date is either a 32-bit or 64-bit signed integer type representing an
* elapsed time since UNIX epoch (1970-01-01), stored in either of two units:
*
* * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
* leap seconds), where the values are evenly divisible by 86400000
* * Days (32 bits) since the UNIX epoch */
struct org_apache_arrow_flatbuf_Date_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Date_vec_len(org_apache_arrow_flatbuf_Date_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Date_table_t org_apache_arrow_flatbuf_Date_vec_at(org_apache_arrow_flatbuf_Date_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Date_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Date)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Date, unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, INT16_C(1))
/** Time is either a 32-bit or 64-bit signed integer type representing an
* elapsed time since midnight, stored in either of four units: seconds,
* milliseconds, microseconds or nanoseconds.
*
* The integer `bitWidth` depends on the `unit` and must be one of the following:
* * SECOND and MILLISECOND: 32 bits
* * MICROSECOND and NANOSECOND: 64 bits
*
* The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
* (exclusive), adjusted for the time unit (for example, up to 86400000
* exclusive for the MILLISECOND unit).
* This definition doesn't allow for leap seconds. Time values from
* measurements with leap seconds will need to be corrected when ingesting
* into Arrow (for example by replacing the value 86400 with 86399). */
struct org_apache_arrow_flatbuf_Time_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Time_vec_len(org_apache_arrow_flatbuf_Time_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Time_table_t org_apache_arrow_flatbuf_Time_vec_at(org_apache_arrow_flatbuf_Time_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Time_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Time)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Time, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Time, bitWidth, flatbuffers_int32, int32_t, INT32_C(32))
/** Timestamp is a 64-bit signed integer representing an elapsed time since a
* fixed epoch, stored in either of four units: seconds, milliseconds,
* microseconds or nanoseconds, and is optionally annotated with a timezone.
*
* Timestamp values do not include any leap seconds (in other words, all
* days are considered 86400 seconds long).
*
* Timestamps with a non-empty timezone
* ------------------------------------
*
* If a Timestamp column has a non-empty timezone value, its epoch is
* 1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone
* (the Unix epoch), regardless of the Timestamp's own timezone.
*
* Therefore, timestamp values with a non-empty timezone correspond to
* physical points in time together with some additional information about
* how the data was obtained and/or how to display it (the timezone).
*
* For example, the timestamp value 0 with the timezone string "Europe/Paris"
* corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the
* application may prefer to display it as "January 1st 1970, 01h00" in
* the Europe/Paris timezone (which is the same physical point in time).
*
* One consequence is that timestamp values with a non-empty timezone
* can be compared and ordered directly, since they all share the same
* well-known point of reference (the Unix epoch).
*
* Timestamps with an unset / empty timezone
* -----------------------------------------
*
* If a Timestamp column has no timezone value, its epoch is
* 1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.
*
* Therefore, timestamp values without a timezone cannot be meaningfully
* interpreted as physical points in time, but only as calendar / clock
* indications ("wall clock time") in an unspecified timezone.
*
* For example, the timestamp value 0 with an empty timezone string
* corresponds to "January 1st 1970, 00h00" in an unknown timezone: there
* is not enough information to interpret it as a well-defined physical
* point in time.
*
* One consequence is that timestamp values without a timezone cannot
* be reliably compared or ordered, since they may have different points of
* reference. In particular, it is *not* possible to interpret an unset
* or empty timezone as the same as "UTC".
*
* Conversion between timezones
* ----------------------------
*
* If a Timestamp column has a non-empty timezone, changing the timezone
* to a different non-empty value is a metadata-only operation:
* the timestamp values need not change as their point of reference remains
* the same (the Unix epoch).
*
* However, if a Timestamp column has no timezone value, changing it to a
* non-empty value requires to think about the desired semantics.
* One possibility is to assume that the original timestamp values are
* relative to the epoch of the timezone being set; timestamp values should
* then adjusted to the Unix epoch (for example, changing the timezone from
* empty to "Europe/Paris" would require converting the timestamp values
* from "Europe/Paris" to "UTC", which seems counter-intuitive but is
* nevertheless correct).
*
* Guidelines for encoding data from external libraries
* ----------------------------------------------------
*
* Date & time libraries often have multiple different data types for temporal
* data. In order to ease interoperability between different implementations the
* Arrow project has some recommendations for encoding these types into a Timestamp
* column.
*
* An "instant" represents a physical point in time that has no relevant timezone
* (for example, astronomical data). To encode an instant, use a Timestamp with
* the timezone string set to "UTC", and make sure the Timestamp values
* are relative to the UTC epoch (January 1st 1970, midnight).
*
* A "zoned date-time" represents a physical point in time annotated with an
* informative timezone (for example, the timezone in which the data was
* recorded). To encode a zoned date-time, use a Timestamp with the timezone
* string set to the name of the timezone, and make sure the Timestamp values
* are relative to the UTC epoch (January 1st 1970, midnight).
*
* (There is some ambiguity between an instant and a zoned date-time with the
* UTC timezone. Both of these are stored the same in Arrow. Typically,
* this distinction does not matter. If it does, then an application should
* use custom metadata or an extension type to distinguish between the two cases.)
*
* An "offset date-time" represents a physical point in time combined with an
* explicit offset from UTC. To encode an offset date-time, use a Timestamp
* with the timezone string set to the numeric timezone offset string
* (e.g. "+03:00"), and make sure the Timestamp values are relative to
* the UTC epoch (January 1st 1970, midnight).
*
* A "naive date-time" (also called "local date-time" in some libraries)
* represents a wall clock time combined with a calendar date, but with
* no indication of how to map this information to a physical point in time.
* Naive date-times must be handled with care because of this missing
* information, and also because daylight saving time (DST) may make
* some values ambiguous or non-existent. A naive date-time may be
* stored as a struct with Date and Time fields. However, it may also be
* encoded into a Timestamp column with an empty timezone. The timestamp
* values should be computed "as if" the timezone of the date-time values
* was UTC; for example, the naive date-time "January 1st 1970, 00h00" would
* be encoded as timestamp value 0. */
struct org_apache_arrow_flatbuf_Timestamp_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Timestamp_vec_len(org_apache_arrow_flatbuf_Timestamp_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Timestamp_table_t org_apache_arrow_flatbuf_Timestamp_vec_at(org_apache_arrow_flatbuf_Timestamp_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Timestamp_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Timestamp, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(0))
/** The timezone is an optional string indicating the name of a timezone,
* one of:
*
* * As used in the Olson timezone database (the "tz database" or
* "tzdata"), such as "America/New_York".
* * An absolute timezone offset of the form "+XX:XX" or "-XX:XX",
* such as "+07:30".
*
* Whether a timezone string is present indicates different semantics about
* the data (see above). */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_Timestamp, timezone, 0)
struct org_apache_arrow_flatbuf_Interval_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Interval_vec_len(org_apache_arrow_flatbuf_Interval_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Interval_table_t org_apache_arrow_flatbuf_Interval_vec_at(org_apache_arrow_flatbuf_Interval_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Interval_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Interval)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Interval, unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, INT16_C(0))
struct org_apache_arrow_flatbuf_Duration_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_Duration_vec_len(org_apache_arrow_flatbuf_Duration_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Duration_table_t org_apache_arrow_flatbuf_Duration_vec_at(org_apache_arrow_flatbuf_Duration_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Duration_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Duration)
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Duration, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
/** ----------------------------------------------------------------------
* Top-level Type value, enabling extensible type-specific metadata. We can
* add new logical types to Type without breaking backwards compatibility */
typedef uint8_t org_apache_arrow_flatbuf_Type_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Type_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_Type)
/** ----------------------------------------------------------------------
* user defined key value pairs to add custom metadata to arrow
* key namespacing is the responsibility of the user */
#define org_apache_arrow_flatbuf_Type_NONE ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_Type_Null ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_Type_Int ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_Type_FloatingPoint ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(3))
#define org_apache_arrow_flatbuf_Type_Binary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(4))
#define org_apache_arrow_flatbuf_Type_Utf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(5))
#define org_apache_arrow_flatbuf_Type_Bool ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(6))
#define org_apache_arrow_flatbuf_Type_Decimal ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(7))
#define org_apache_arrow_flatbuf_Type_Date ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(8))
#define org_apache_arrow_flatbuf_Type_Time ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(9))
#define org_apache_arrow_flatbuf_Type_Timestamp ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(10))
#define org_apache_arrow_flatbuf_Type_Interval ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(11))
#define org_apache_arrow_flatbuf_Type_List ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(12))
#define org_apache_arrow_flatbuf_Type_Struct_ ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(13))
#define org_apache_arrow_flatbuf_Type_Union ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(14))
#define org_apache_arrow_flatbuf_Type_FixedSizeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(15))
#define org_apache_arrow_flatbuf_Type_FixedSizeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(16))
#define org_apache_arrow_flatbuf_Type_Map ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(17))
#define org_apache_arrow_flatbuf_Type_Duration ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(18))
#define org_apache_arrow_flatbuf_Type_LargeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(19))
#define org_apache_arrow_flatbuf_Type_LargeUtf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(20))
#define org_apache_arrow_flatbuf_Type_LargeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(21))
#define org_apache_arrow_flatbuf_Type_RunEndEncoded ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(22))
static inline const char *org_apache_arrow_flatbuf_Type_type_name(org_apache_arrow_flatbuf_Type_union_type_t type)
{
switch (type) {
case org_apache_arrow_flatbuf_Type_NONE: return "NONE";
case org_apache_arrow_flatbuf_Type_Null: return "Null";
case org_apache_arrow_flatbuf_Type_Int: return "Int";
case org_apache_arrow_flatbuf_Type_FloatingPoint: return "FloatingPoint";
case org_apache_arrow_flatbuf_Type_Binary: return "Binary";
case org_apache_arrow_flatbuf_Type_Utf8: return "Utf8";
case org_apache_arrow_flatbuf_Type_Bool: return "Bool";
case org_apache_arrow_flatbuf_Type_Decimal: return "Decimal";
case org_apache_arrow_flatbuf_Type_Date: return "Date";
case org_apache_arrow_flatbuf_Type_Time: return "Time";
case org_apache_arrow_flatbuf_Type_Timestamp: return "Timestamp";
case org_apache_arrow_flatbuf_Type_Interval: return "Interval";
case org_apache_arrow_flatbuf_Type_List: return "List";
case org_apache_arrow_flatbuf_Type_Struct_: return "Struct_";
case org_apache_arrow_flatbuf_Type_Union: return "Union";
case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return "FixedSizeBinary";
case org_apache_arrow_flatbuf_Type_FixedSizeList: return "FixedSizeList";
case org_apache_arrow_flatbuf_Type_Map: return "Map";
case org_apache_arrow_flatbuf_Type_Duration: return "Duration";
case org_apache_arrow_flatbuf_Type_LargeBinary: return "LargeBinary";
case org_apache_arrow_flatbuf_Type_LargeUtf8: return "LargeUtf8";
case org_apache_arrow_flatbuf_Type_LargeList: return "LargeList";
case org_apache_arrow_flatbuf_Type_RunEndEncoded: return "RunEndEncoded";
default: return "";
}
}
static inline int org_apache_arrow_flatbuf_Type_is_known_type(org_apache_arrow_flatbuf_Type_union_type_t type)
{
switch (type) {
case org_apache_arrow_flatbuf_Type_NONE: return 1;
case org_apache_arrow_flatbuf_Type_Null: return 1;
case org_apache_arrow_flatbuf_Type_Int: return 1;
case org_apache_arrow_flatbuf_Type_FloatingPoint: return 1;
case org_apache_arrow_flatbuf_Type_Binary: return 1;
case org_apache_arrow_flatbuf_Type_Utf8: return 1;
case org_apache_arrow_flatbuf_Type_Bool: return 1;
case org_apache_arrow_flatbuf_Type_Decimal: return 1;
case org_apache_arrow_flatbuf_Type_Date: return 1;
case org_apache_arrow_flatbuf_Type_Time: return 1;
case org_apache_arrow_flatbuf_Type_Timestamp: return 1;
case org_apache_arrow_flatbuf_Type_Interval: return 1;
case org_apache_arrow_flatbuf_Type_List: return 1;
case org_apache_arrow_flatbuf_Type_Struct_: return 1;
case org_apache_arrow_flatbuf_Type_Union: return 1;
case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return 1;
case org_apache_arrow_flatbuf_Type_FixedSizeList: return 1;
case org_apache_arrow_flatbuf_Type_Map: return 1;
case org_apache_arrow_flatbuf_Type_Duration: return 1;
case org_apache_arrow_flatbuf_Type_LargeBinary: return 1;
case org_apache_arrow_flatbuf_Type_LargeUtf8: return 1;
case org_apache_arrow_flatbuf_Type_LargeList: return 1;
case org_apache_arrow_flatbuf_Type_RunEndEncoded: return 1;
default: return 0;
}
}
struct org_apache_arrow_flatbuf_KeyValue_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_KeyValue_vec_len(org_apache_arrow_flatbuf_KeyValue_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_KeyValue_table_t org_apache_arrow_flatbuf_KeyValue_vec_at(org_apache_arrow_flatbuf_KeyValue_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_KeyValue_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_KeyValue)
__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_KeyValue, key, 0)
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_KeyValue, value, 0)
struct org_apache_arrow_flatbuf_DictionaryEncoding_table { uint8_t unused__; };
static inline size_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_len(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_DictionaryEncoding_table_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_DictionaryEncoding)
/** The known dictionary id in the application where this data is used. In
* the file or streaming formats, the dictionary ids are found in the
* DictionaryBatch messages */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_DictionaryEncoding, id, flatbuffers_int64, int64_t, INT64_C(0))
/** The dictionary indices are constrained to be non-negative integers. If
* this field is null, the indices must be signed int32. To maximize
* cross-language compatibility and performance, implementations are
* recommended to prefer signed integer types over unsigned integer types
* and to avoid uint64 indices unless they are required by an application. */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_Diction