aboutsummaryrefslogtreecommitdiff
path: root/include/flatcc/reflection
diff options
context:
space:
mode:
Diffstat (limited to 'include/flatcc/reflection')
-rw-r--r--include/flatcc/reflection/README19
-rw-r--r--include/flatcc/reflection/flatbuffers_common_builder.h685
-rw-r--r--include/flatcc/reflection/flatbuffers_common_reader.h578
-rw-r--r--include/flatcc/reflection/reflection_builder.h457
-rw-r--r--include/flatcc/reflection/reflection_reader.h411
-rw-r--r--include/flatcc/reflection/reflection_verifier.h308
6 files changed, 2458 insertions, 0 deletions
diff --git a/include/flatcc/reflection/README b/include/flatcc/reflection/README
new file mode 100644
index 0000000..3c7207a
--- /dev/null
+++ b/include/flatcc/reflection/README
@@ -0,0 +1,19 @@
+Generated by flatcc
+
+Keep checked in - needed by flatcc to generate binary schema.
+
+NOTE TO CONTRIBUTORS: DO NOT EDIT THESE FILES BY HAND
+
+If you need to change anything here, it is done in the code generator,
+possibly followed by running `reflection/generate_code.sh` from the
+project root. But please only do this for testing do not include the
+generated files in a pull request unless agreed otherwise, and if so,
+do it in a separate commit.
+
+Normally new reflection code is generated during a release which also
+updates the version number in comments and there is no reason to update
+reflection on every commit unless it breaks something fundamentally.
+
+There is a build option `FLATCC_REFLECTION` to disable reflection which
+is helpful while making changes that affect the content of these files
+in a way that would prevent the flatcc compiler from building.
diff --git a/include/flatcc/reflection/flatbuffers_common_builder.h b/include/flatcc/reflection/flatbuffers_common_builder.h
new file mode 100644
index 0000000..a4be1ce
--- /dev/null
+++ b/include/flatcc/reflection/flatbuffers_common_builder.h
@@ -0,0 +1,685 @@
+#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 */
diff --git a/include/flatcc/reflection/flatbuffers_common_reader.h b/include/flatcc/reflection/flatbuffers_common_reader.h
new file mode 100644
index 0000000..c575308
--- /dev/null
+++ b/include/flatcc/reflection/flatbuffers_common_reader.h
@@ -0,0 +1,578 @@
+#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 */
diff --git a/include/flatcc/reflection/reflection_builder.h b/include/flatcc/reflection/reflection_builder.h
new file mode 100644
index 0000000..65aef73
--- /dev/null
+++ b/include/flatcc/reflection/reflection_builder.h
@@ -0,0 +1,457 @@
+#ifndef REFLECTION_BUILDER_H
+#define REFLECTION_BUILDER_H
+
+/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */
+
+#ifndef REFLECTION_READER_H
+#include "reflection_reader.h"
+#endif
+#ifndef FLATBUFFERS_COMMON_BUILDER_H
+#include "flatbuffers_common_builder.h"
+#endif
+#include "flatcc/flatcc_prologue.h"
+#undef flatbuffers_identifier
+#define flatbuffers_identifier "BFBS"
+#undef flatbuffers_extension
+#define flatbuffers_extension "bfbs"
+
+#define __reflection_BaseType_formal_args , reflection_BaseType_enum_t v0
+#define __reflection_BaseType_call_args , v0
+__flatbuffers_build_scalar(flatbuffers_, reflection_BaseType, reflection_BaseType_enum_t)
+
+static const flatbuffers_voffset_t __reflection_Type_required[] = { 0 };
+typedef flatbuffers_ref_t reflection_Type_ref_t;
+static reflection_Type_ref_t reflection_Type_clone(flatbuffers_builder_t *B, reflection_Type_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_Type, 4)
+
+static const flatbuffers_voffset_t __reflection_KeyValue_required[] = { 0, 0 };
+typedef flatbuffers_ref_t reflection_KeyValue_ref_t;
+static reflection_KeyValue_ref_t reflection_KeyValue_clone(flatbuffers_builder_t *B, reflection_KeyValue_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_KeyValue, 2)
+
+static const flatbuffers_voffset_t __reflection_EnumVal_required[] = { 0, 0 };
+typedef flatbuffers_ref_t reflection_EnumVal_ref_t;
+static reflection_EnumVal_ref_t reflection_EnumVal_clone(flatbuffers_builder_t *B, reflection_EnumVal_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_EnumVal, 5)
+
+static const flatbuffers_voffset_t __reflection_Enum_required[] = { 0, 1, 3, 0 };
+typedef flatbuffers_ref_t reflection_Enum_ref_t;
+static reflection_Enum_ref_t reflection_Enum_clone(flatbuffers_builder_t *B, reflection_Enum_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_Enum, 6)
+
+static const flatbuffers_voffset_t __reflection_Field_required[] = { 0, 1, 0 };
+typedef flatbuffers_ref_t reflection_Field_ref_t;
+static reflection_Field_ref_t reflection_Field_clone(flatbuffers_builder_t *B, reflection_Field_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_Field, 12)
+
+static const flatbuffers_voffset_t __reflection_Object_required[] = { 0, 1, 0 };
+typedef flatbuffers_ref_t reflection_Object_ref_t;
+static reflection_Object_ref_t reflection_Object_clone(flatbuffers_builder_t *B, reflection_Object_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_Object, 7)
+
+static const flatbuffers_voffset_t __reflection_RPCCall_required[] = { 0, 1, 2, 0 };
+typedef flatbuffers_ref_t reflection_RPCCall_ref_t;
+static reflection_RPCCall_ref_t reflection_RPCCall_clone(flatbuffers_builder_t *B, reflection_RPCCall_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_RPCCall, 5)
+
+static const flatbuffers_voffset_t __reflection_Service_required[] = { 0, 0 };
+typedef flatbuffers_ref_t reflection_Service_ref_t;
+static reflection_Service_ref_t reflection_Service_clone(flatbuffers_builder_t *B, reflection_Service_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_Service, 4)
+
+static const flatbuffers_voffset_t __reflection_Schema_required[] = { 0, 1, 0 };
+typedef flatbuffers_ref_t reflection_Schema_ref_t;
+static reflection_Schema_ref_t reflection_Schema_clone(flatbuffers_builder_t *B, reflection_Schema_table_t t);
+__flatbuffers_build_table(flatbuffers_, reflection_Schema, 6)
+
+#define __reflection_Type_formal_args , reflection_BaseType_enum_t v0, reflection_BaseType_enum_t v1, int32_t v2, uint16_t v3
+#define __reflection_Type_call_args , v0, v1, v2, v3
+static inline reflection_Type_ref_t reflection_Type_create(flatbuffers_builder_t *B __reflection_Type_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_Type, reflection_Type_file_identifier, reflection_Type_type_identifier)
+
+#define __reflection_KeyValue_formal_args , flatbuffers_string_ref_t v0, flatbuffers_string_ref_t v1
+#define __reflection_KeyValue_call_args , v0, v1
+static inline reflection_KeyValue_ref_t reflection_KeyValue_create(flatbuffers_builder_t *B __reflection_KeyValue_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_KeyValue, reflection_KeyValue_file_identifier, reflection_KeyValue_type_identifier)
+
+#define __reflection_EnumVal_formal_args ,\
+ flatbuffers_string_ref_t v0, int64_t v1, reflection_Object_ref_t v2, reflection_Type_ref_t v3, flatbuffers_string_vec_ref_t v4
+#define __reflection_EnumVal_call_args ,\
+ v0, v1, v2, v3, v4
+static inline reflection_EnumVal_ref_t reflection_EnumVal_create(flatbuffers_builder_t *B __reflection_EnumVal_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_EnumVal, reflection_EnumVal_file_identifier, reflection_EnumVal_type_identifier)
+
+#define __reflection_Enum_formal_args ,\
+ flatbuffers_string_ref_t v0, reflection_EnumVal_vec_ref_t v1, flatbuffers_bool_t v2, reflection_Type_ref_t v3, reflection_KeyValue_vec_ref_t v4, flatbuffers_string_vec_ref_t v5
+#define __reflection_Enum_call_args ,\
+ v0, v1, v2, v3, v4, v5
+static inline reflection_Enum_ref_t reflection_Enum_create(flatbuffers_builder_t *B __reflection_Enum_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_Enum, reflection_Enum_file_identifier, reflection_Enum_type_identifier)
+
+#define __reflection_Field_formal_args ,\
+ flatbuffers_string_ref_t v0, reflection_Type_ref_t v1, uint16_t v2, uint16_t v3,\
+ int64_t v4, double v5, flatbuffers_bool_t v6, flatbuffers_bool_t v7,\
+ flatbuffers_bool_t v8, reflection_KeyValue_vec_ref_t v9, flatbuffers_string_vec_ref_t v10, flatbuffers_bool_t v11
+#define __reflection_Field_call_args ,\
+ v0, v1, v2, v3,\
+ v4, v5, v6, v7,\
+ v8, v9, v10, v11
+static inline reflection_Field_ref_t reflection_Field_create(flatbuffers_builder_t *B __reflection_Field_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_Field, reflection_Field_file_identifier, reflection_Field_type_identifier)
+
+#define __reflection_Object_formal_args ,\
+ flatbuffers_string_ref_t v0, reflection_Field_vec_ref_t v1, flatbuffers_bool_t v2, int32_t v3,\
+ int32_t v4, reflection_KeyValue_vec_ref_t v5, flatbuffers_string_vec_ref_t v6
+#define __reflection_Object_call_args ,\
+ v0, v1, v2, v3,\
+ v4, v5, v6
+static inline reflection_Object_ref_t reflection_Object_create(flatbuffers_builder_t *B __reflection_Object_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_Object, reflection_Object_file_identifier, reflection_Object_type_identifier)
+
+#define __reflection_RPCCall_formal_args ,\
+ flatbuffers_string_ref_t v0, reflection_Object_ref_t v1, reflection_Object_ref_t v2, reflection_KeyValue_vec_ref_t v3, flatbuffers_string_vec_ref_t v4
+#define __reflection_RPCCall_call_args ,\
+ v0, v1, v2, v3, v4
+static inline reflection_RPCCall_ref_t reflection_RPCCall_create(flatbuffers_builder_t *B __reflection_RPCCall_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_RPCCall, reflection_RPCCall_file_identifier, reflection_RPCCall_type_identifier)
+
+#define __reflection_Service_formal_args , flatbuffers_string_ref_t v0, reflection_RPCCall_vec_ref_t v1, reflection_KeyValue_vec_ref_t v2, flatbuffers_string_vec_ref_t v3
+#define __reflection_Service_call_args , v0, v1, v2, v3
+static inline reflection_Service_ref_t reflection_Service_create(flatbuffers_builder_t *B __reflection_Service_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_Service, reflection_Service_file_identifier, reflection_Service_type_identifier)
+
+#define __reflection_Schema_formal_args ,\
+ reflection_Object_vec_ref_t v0, reflection_Enum_vec_ref_t v1, flatbuffers_string_ref_t v2, flatbuffers_string_ref_t v3, reflection_Object_ref_t v4, reflection_Service_vec_ref_t v5
+#define __reflection_Schema_call_args ,\
+ v0, v1, v2, v3, v4, v5
+static inline reflection_Schema_ref_t reflection_Schema_create(flatbuffers_builder_t *B __reflection_Schema_formal_args);
+__flatbuffers_build_table_prolog(flatbuffers_, reflection_Schema, reflection_Schema_file_identifier, reflection_Schema_type_identifier)
+
+__flatbuffers_build_scalar_field(0, flatbuffers_, reflection_Type_base_type, reflection_BaseType, reflection_BaseType_enum_t, 1, 1, INT8_C(0), reflection_Type)
+__flatbuffers_build_scalar_field(1, flatbuffers_, reflection_Type_element, reflection_BaseType, reflection_BaseType_enum_t, 1, 1, INT8_C(0), reflection_Type)
+__flatbuffers_build_scalar_field(2, flatbuffers_, reflection_Type_index, flatbuffers_int32, int32_t, 4, 4, INT32_C(-1), reflection_Type)
+__flatbuffers_build_scalar_field(3, flatbuffers_, reflection_Type_fixed_length, flatbuffers_uint16, uint16_t, 2, 2, UINT16_C(0), reflection_Type)
+
+static inline reflection_Type_ref_t reflection_Type_create(flatbuffers_builder_t *B __reflection_Type_formal_args)
+{
+ if (reflection_Type_start(B)
+ || reflection_Type_index_add(B, v2)
+ || reflection_Type_fixed_length_add(B, v3)
+ || reflection_Type_base_type_add(B, v0)
+ || reflection_Type_element_add(B, v1)) {
+ return 0;
+ }
+ return reflection_Type_end(B);
+}
+
+static reflection_Type_ref_t reflection_Type_clone(flatbuffers_builder_t *B, reflection_Type_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_Type_start(B)
+ || reflection_Type_index_pick(B, t)
+ || reflection_Type_fixed_length_pick(B, t)
+ || reflection_Type_base_type_pick(B, t)
+ || reflection_Type_element_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_Type_end(B));
+}
+
+__flatbuffers_build_string_field(0, flatbuffers_, reflection_KeyValue_key, reflection_KeyValue)
+__flatbuffers_build_string_field(1, flatbuffers_, reflection_KeyValue_value, reflection_KeyValue)
+
+static inline reflection_KeyValue_ref_t reflection_KeyValue_create(flatbuffers_builder_t *B __reflection_KeyValue_formal_args)
+{
+ if (reflection_KeyValue_start(B)
+ || reflection_KeyValue_key_add(B, v0)
+ || reflection_KeyValue_value_add(B, v1)) {
+ return 0;
+ }
+ return reflection_KeyValue_end(B);
+}
+
+static reflection_KeyValue_ref_t reflection_KeyValue_clone(flatbuffers_builder_t *B, reflection_KeyValue_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_KeyValue_start(B)
+ || reflection_KeyValue_key_pick(B, t)
+ || reflection_KeyValue_value_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_KeyValue_end(B));
+}
+
+__flatbuffers_build_string_field(0, flatbuffers_, reflection_EnumVal_name, reflection_EnumVal)
+__flatbuffers_build_scalar_field(1, flatbuffers_, reflection_EnumVal_value, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), reflection_EnumVal)
+__flatbuffers_build_table_field(2, flatbuffers_, reflection_EnumVal_object, reflection_Object, reflection_EnumVal)
+__flatbuffers_build_table_field(3, flatbuffers_, reflection_EnumVal_union_type, reflection_Type, reflection_EnumVal)
+__flatbuffers_build_string_vector_field(4, flatbuffers_, reflection_EnumVal_documentation, reflection_EnumVal)
+
+static inline reflection_EnumVal_ref_t reflection_EnumVal_create(flatbuffers_builder_t *B __reflection_EnumVal_formal_args)
+{
+ if (reflection_EnumVal_start(B)
+ || reflection_EnumVal_value_add(B, v1)
+ || reflection_EnumVal_name_add(B, v0)
+ || reflection_EnumVal_object_add(B, v2)
+ || reflection_EnumVal_union_type_add(B, v3)
+ || reflection_EnumVal_documentation_add(B, v4)) {
+ return 0;
+ }
+ return reflection_EnumVal_end(B);
+}
+
+static reflection_EnumVal_ref_t reflection_EnumVal_clone(flatbuffers_builder_t *B, reflection_EnumVal_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_EnumVal_start(B)
+ || reflection_EnumVal_value_pick(B, t)
+ || reflection_EnumVal_name_pick(B, t)
+ || reflection_EnumVal_object_pick(B, t)
+ || reflection_EnumVal_union_type_pick(B, t)
+ || reflection_EnumVal_documentation_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_EnumVal_end(B));
+}
+
+__flatbuffers_build_string_field(0, flatbuffers_, reflection_Enum_name, reflection_Enum)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(1, flatbuffers_, reflection_Enum_values, reflection_EnumVal, reflection_Enum)
+__flatbuffers_build_scalar_field(2, flatbuffers_, reflection_Enum_is_union, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), reflection_Enum)
+__flatbuffers_build_table_field(3, flatbuffers_, reflection_Enum_underlying_type, reflection_Type, reflection_Enum)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(4, flatbuffers_, reflection_Enum_attributes, reflection_KeyValue, reflection_Enum)
+__flatbuffers_build_string_vector_field(5, flatbuffers_, reflection_Enum_documentation, reflection_Enum)
+
+static inline reflection_Enum_ref_t reflection_Enum_create(flatbuffers_builder_t *B __reflection_Enum_formal_args)
+{
+ if (reflection_Enum_start(B)
+ || reflection_Enum_name_add(B, v0)
+ || reflection_Enum_values_add(B, v1)
+ || reflection_Enum_underlying_type_add(B, v3)
+ || reflection_Enum_attributes_add(B, v4)
+ || reflection_Enum_documentation_add(B, v5)
+ || reflection_Enum_is_union_add(B, v2)) {
+ return 0;
+ }
+ return reflection_Enum_end(B);
+}
+
+static reflection_Enum_ref_t reflection_Enum_clone(flatbuffers_builder_t *B, reflection_Enum_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_Enum_start(B)
+ || reflection_Enum_name_pick(B, t)
+ || reflection_Enum_values_pick(B, t)
+ || reflection_Enum_underlying_type_pick(B, t)
+ || reflection_Enum_attributes_pick(B, t)
+ || reflection_Enum_documentation_pick(B, t)
+ || reflection_Enum_is_union_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_Enum_end(B));
+}
+
+__flatbuffers_build_string_field(0, flatbuffers_, reflection_Field_name, reflection_Field)
+__flatbuffers_build_table_field(1, flatbuffers_, reflection_Field_type, reflection_Type, reflection_Field)
+__flatbuffers_build_scalar_field(2, flatbuffers_, reflection_Field_id, flatbuffers_uint16, uint16_t, 2, 2, UINT16_C(0), reflection_Field)
+__flatbuffers_build_scalar_field(3, flatbuffers_, reflection_Field_offset, flatbuffers_uint16, uint16_t, 2, 2, UINT16_C(0), reflection_Field)
+__flatbuffers_build_scalar_field(4, flatbuffers_, reflection_Field_default_integer, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), reflection_Field)
+__flatbuffers_build_scalar_field(5, flatbuffers_, reflection_Field_default_real, flatbuffers_double, double, 8, 8, 0.0000000000000000, reflection_Field)
+__flatbuffers_build_scalar_field(6, flatbuffers_, reflection_Field_deprecated, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), reflection_Field)
+__flatbuffers_build_scalar_field(7, flatbuffers_, reflection_Field_required, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), reflection_Field)
+__flatbuffers_build_scalar_field(8, flatbuffers_, reflection_Field_key, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), reflection_Field)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(9, flatbuffers_, reflection_Field_attributes, reflection_KeyValue, reflection_Field)
+__flatbuffers_build_string_vector_field(10, flatbuffers_, reflection_Field_documentation, reflection_Field)
+__flatbuffers_build_scalar_field(11, flatbuffers_, reflection_Field_optional, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), reflection_Field)
+
+static inline reflection_Field_ref_t reflection_Field_create(flatbuffers_builder_t *B __reflection_Field_formal_args)
+{
+ if (reflection_Field_start(B)
+ || reflection_Field_default_integer_add(B, v4)
+ || reflection_Field_default_real_add(B, v5)
+ || reflection_Field_name_add(B, v0)
+ || reflection_Field_type_add(B, v1)
+ || reflection_Field_attributes_add(B, v9)
+ || reflection_Field_documentation_add(B, v10)
+ || reflection_Field_id_add(B, v2)
+ || reflection_Field_offset_add(B, v3)
+ || reflection_Field_deprecated_add(B, v6)
+ || reflection_Field_required_add(B, v7)
+ || reflection_Field_key_add(B, v8)
+ || reflection_Field_optional_add(B, v11)) {
+ return 0;
+ }
+ return reflection_Field_end(B);
+}
+
+static reflection_Field_ref_t reflection_Field_clone(flatbuffers_builder_t *B, reflection_Field_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_Field_start(B)
+ || reflection_Field_default_integer_pick(B, t)
+ || reflection_Field_default_real_pick(B, t)
+ || reflection_Field_name_pick(B, t)
+ || reflection_Field_type_pick(B, t)
+ || reflection_Field_attributes_pick(B, t)
+ || reflection_Field_documentation_pick(B, t)
+ || reflection_Field_id_pick(B, t)
+ || reflection_Field_offset_pick(B, t)
+ || reflection_Field_deprecated_pick(B, t)
+ || reflection_Field_required_pick(B, t)
+ || reflection_Field_key_pick(B, t)
+ || reflection_Field_optional_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_Field_end(B));
+}
+
+__flatbuffers_build_string_field(0, flatbuffers_, reflection_Object_name, reflection_Object)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(1, flatbuffers_, reflection_Object_fields, reflection_Field, reflection_Object)
+__flatbuffers_build_scalar_field(2, flatbuffers_, reflection_Object_is_struct, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), reflection_Object)
+__flatbuffers_build_scalar_field(3, flatbuffers_, reflection_Object_minalign, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), reflection_Object)
+__flatbuffers_build_scalar_field(4, flatbuffers_, reflection_Object_bytesize, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), reflection_Object)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(5, flatbuffers_, reflection_Object_attributes, reflection_KeyValue, reflection_Object)
+__flatbuffers_build_string_vector_field(6, flatbuffers_, reflection_Object_documentation, reflection_Object)
+
+static inline reflection_Object_ref_t reflection_Object_create(flatbuffers_builder_t *B __reflection_Object_formal_args)
+{
+ if (reflection_Object_start(B)
+ || reflection_Object_name_add(B, v0)
+ || reflection_Object_fields_add(B, v1)
+ || reflection_Object_minalign_add(B, v3)
+ || reflection_Object_bytesize_add(B, v4)
+ || reflection_Object_attributes_add(B, v5)
+ || reflection_Object_documentation_add(B, v6)
+ || reflection_Object_is_struct_add(B, v2)) {
+ return 0;
+ }
+ return reflection_Object_end(B);
+}
+
+static reflection_Object_ref_t reflection_Object_clone(flatbuffers_builder_t *B, reflection_Object_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_Object_start(B)
+ || reflection_Object_name_pick(B, t)
+ || reflection_Object_fields_pick(B, t)
+ || reflection_Object_minalign_pick(B, t)
+ || reflection_Object_bytesize_pick(B, t)
+ || reflection_Object_attributes_pick(B, t)
+ || reflection_Object_documentation_pick(B, t)
+ || reflection_Object_is_struct_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_Object_end(B));
+}
+
+__flatbuffers_build_string_field(0, flatbuffers_, reflection_RPCCall_name, reflection_RPCCall)
+__flatbuffers_build_table_field(1, flatbuffers_, reflection_RPCCall_request, reflection_Object, reflection_RPCCall)
+__flatbuffers_build_table_field(2, flatbuffers_, reflection_RPCCall_response, reflection_Object, reflection_RPCCall)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(3, flatbuffers_, reflection_RPCCall_attributes, reflection_KeyValue, reflection_RPCCall)
+__flatbuffers_build_string_vector_field(4, flatbuffers_, reflection_RPCCall_documentation, reflection_RPCCall)
+
+static inline reflection_RPCCall_ref_t reflection_RPCCall_create(flatbuffers_builder_t *B __reflection_RPCCall_formal_args)
+{
+ if (reflection_RPCCall_start(B)
+ || reflection_RPCCall_name_add(B, v0)
+ || reflection_RPCCall_request_add(B, v1)
+ || reflection_RPCCall_response_add(B, v2)
+ || reflection_RPCCall_attributes_add(B, v3)
+ || reflection_RPCCall_documentation_add(B, v4)) {
+ return 0;
+ }
+ return reflection_RPCCall_end(B);
+}
+
+static reflection_RPCCall_ref_t reflection_RPCCall_clone(flatbuffers_builder_t *B, reflection_RPCCall_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_RPCCall_start(B)
+ || reflection_RPCCall_name_pick(B, t)
+ || reflection_RPCCall_request_pick(B, t)
+ || reflection_RPCCall_response_pick(B, t)
+ || reflection_RPCCall_attributes_pick(B, t)
+ || reflection_RPCCall_documentation_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_RPCCall_end(B));
+}
+
+__flatbuffers_build_string_field(0, flatbuffers_, reflection_Service_name, reflection_Service)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(1, flatbuffers_, reflection_Service_calls, reflection_RPCCall, reflection_Service)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(2, flatbuffers_, reflection_Service_attributes, reflection_KeyValue, reflection_Service)
+__flatbuffers_build_string_vector_field(3, flatbuffers_, reflection_Service_documentation, reflection_Service)
+
+static inline reflection_Service_ref_t reflection_Service_create(flatbuffers_builder_t *B __reflection_Service_formal_args)
+{
+ if (reflection_Service_start(B)
+ || reflection_Service_name_add(B, v0)
+ || reflection_Service_calls_add(B, v1)
+ || reflection_Service_attributes_add(B, v2)
+ || reflection_Service_documentation_add(B, v3)) {
+ return 0;
+ }
+ return reflection_Service_end(B);
+}
+
+static reflection_Service_ref_t reflection_Service_clone(flatbuffers_builder_t *B, reflection_Service_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_Service_start(B)
+ || reflection_Service_name_pick(B, t)
+ || reflection_Service_calls_pick(B, t)
+ || reflection_Service_attributes_pick(B, t)
+ || reflection_Service_documentation_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_Service_end(B));
+}
+
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(0, flatbuffers_, reflection_Schema_objects, reflection_Object, reflection_Schema)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(1, flatbuffers_, reflection_Schema_enums, reflection_Enum, reflection_Schema)
+__flatbuffers_build_string_field(2, flatbuffers_, reflection_Schema_file_ident, reflection_Schema)
+__flatbuffers_build_string_field(3, flatbuffers_, reflection_Schema_file_ext, reflection_Schema)
+__flatbuffers_build_table_field(4, flatbuffers_, reflection_Schema_root_table, reflection_Object, reflection_Schema)
+/* vector has keyed elements */
+__flatbuffers_build_table_vector_field(5, flatbuffers_, reflection_Schema_services, reflection_Service, reflection_Schema)
+
+static inline reflection_Schema_ref_t reflection_Schema_create(flatbuffers_builder_t *B __reflection_Schema_formal_args)
+{
+ if (reflection_Schema_start(B)
+ || reflection_Schema_objects_add(B, v0)
+ || reflection_Schema_enums_add(B, v1)
+ || reflection_Schema_file_ident_add(B, v2)
+ || reflection_Schema_file_ext_add(B, v3)
+ || reflection_Schema_root_table_add(B, v4)
+ || reflection_Schema_services_add(B, v5)) {
+ return 0;
+ }
+ return reflection_Schema_end(B);
+}
+
+static reflection_Schema_ref_t reflection_Schema_clone(flatbuffers_builder_t *B, reflection_Schema_table_t t)
+{
+ __flatbuffers_memoize_begin(B, t);
+ if (reflection_Schema_start(B)
+ || reflection_Schema_objects_pick(B, t)
+ || reflection_Schema_enums_pick(B, t)
+ || reflection_Schema_file_ident_pick(B, t)
+ || reflection_Schema_file_ext_pick(B, t)
+ || reflection_Schema_root_table_pick(B, t)
+ || reflection_Schema_services_pick(B, t)) {
+ return 0;
+ }
+ __flatbuffers_memoize_end(B, t, reflection_Schema_end(B));
+}
+
+#include "flatcc/flatcc_epilogue.h"
+#endif /* REFLECTION_BUILDER_H */
diff --git a/include/flatcc/reflection/reflection_reader.h b/include/flatcc/reflection/reflection_reader.h
new file mode 100644
index 0000000..bf6a0e9
--- /dev/null
+++ b/include/flatcc/reflection/reflection_reader.h
@@ -0,0 +1,411 @@
+#ifndef REFLECTION_READER_H
+#define REFLECTION_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"
+#undef flatbuffers_identifier
+#define flatbuffers_identifier "BFBS"
+#undef flatbuffers_extension
+#define flatbuffers_extension "bfbs"
+
+
+typedef const struct reflection_Type_table *reflection_Type_table_t;
+typedef struct reflection_Type_table *reflection_Type_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_Type_vec_t;
+typedef flatbuffers_uoffset_t *reflection_Type_mutable_vec_t;
+typedef const struct reflection_KeyValue_table *reflection_KeyValue_table_t;
+typedef struct reflection_KeyValue_table *reflection_KeyValue_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_KeyValue_vec_t;
+typedef flatbuffers_uoffset_t *reflection_KeyValue_mutable_vec_t;
+typedef const struct reflection_EnumVal_table *reflection_EnumVal_table_t;
+typedef struct reflection_EnumVal_table *reflection_EnumVal_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_EnumVal_vec_t;
+typedef flatbuffers_uoffset_t *reflection_EnumVal_mutable_vec_t;
+typedef const struct reflection_Enum_table *reflection_Enum_table_t;
+typedef struct reflection_Enum_table *reflection_Enum_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_Enum_vec_t;
+typedef flatbuffers_uoffset_t *reflection_Enum_mutable_vec_t;
+typedef const struct reflection_Field_table *reflection_Field_table_t;
+typedef struct reflection_Field_table *reflection_Field_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_Field_vec_t;
+typedef flatbuffers_uoffset_t *reflection_Field_mutable_vec_t;
+typedef const struct reflection_Object_table *reflection_Object_table_t;
+typedef struct reflection_Object_table *reflection_Object_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_Object_vec_t;
+typedef flatbuffers_uoffset_t *reflection_Object_mutable_vec_t;
+typedef const struct reflection_RPCCall_table *reflection_RPCCall_table_t;
+typedef struct reflection_RPCCall_table *reflection_RPCCall_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_RPCCall_vec_t;
+typedef flatbuffers_uoffset_t *reflection_RPCCall_mutable_vec_t;
+typedef const struct reflection_Service_table *reflection_Service_table_t;
+typedef struct reflection_Service_table *reflection_Service_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_Service_vec_t;
+typedef flatbuffers_uoffset_t *reflection_Service_mutable_vec_t;
+typedef const struct reflection_Schema_table *reflection_Schema_table_t;
+typedef struct reflection_Schema_table *reflection_Schema_mutable_table_t;
+typedef const flatbuffers_uoffset_t *reflection_Schema_vec_t;
+typedef flatbuffers_uoffset_t *reflection_Schema_mutable_vec_t;
+#ifndef reflection_Type_file_identifier
+#define reflection_Type_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_Type_file_identifier */
+#ifndef reflection_Type_identifier
+#define reflection_Type_identifier "BFBS"
+#endif
+#define reflection_Type_type_hash ((flatbuffers_thash_t)0x44c8fe5e)
+#define reflection_Type_type_identifier "\x5e\xfe\xc8\x44"
+#ifndef reflection_Type_file_extension
+#define reflection_Type_file_extension "bfbs"
+#endif
+#ifndef reflection_KeyValue_file_identifier
+#define reflection_KeyValue_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_KeyValue_file_identifier */
+#ifndef reflection_KeyValue_identifier
+#define reflection_KeyValue_identifier "BFBS"
+#endif
+#define reflection_KeyValue_type_hash ((flatbuffers_thash_t)0x8c761eaa)
+#define reflection_KeyValue_type_identifier "\xaa\x1e\x76\x8c"
+#ifndef reflection_KeyValue_file_extension
+#define reflection_KeyValue_file_extension "bfbs"
+#endif
+#ifndef reflection_EnumVal_file_identifier
+#define reflection_EnumVal_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_EnumVal_file_identifier */
+#ifndef reflection_EnumVal_identifier
+#define reflection_EnumVal_identifier "BFBS"
+#endif
+#define reflection_EnumVal_type_hash ((flatbuffers_thash_t)0x9531c946)
+#define reflection_EnumVal_type_identifier "\x46\xc9\x31\x95"
+#ifndef reflection_EnumVal_file_extension
+#define reflection_EnumVal_file_extension "bfbs"
+#endif
+#ifndef reflection_Enum_file_identifier
+#define reflection_Enum_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_Enum_file_identifier */
+#ifndef reflection_Enum_identifier
+#define reflection_Enum_identifier "BFBS"
+#endif
+#define reflection_Enum_type_hash ((flatbuffers_thash_t)0xacffa90f)
+#define reflection_Enum_type_identifier "\x0f\xa9\xff\xac"
+#ifndef reflection_Enum_file_extension
+#define reflection_Enum_file_extension "bfbs"
+#endif
+#ifndef reflection_Field_file_identifier
+#define reflection_Field_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_Field_file_identifier */
+#ifndef reflection_Field_identifier
+#define reflection_Field_identifier "BFBS"
+#endif
+#define reflection_Field_type_hash ((flatbuffers_thash_t)0x9f7e408a)
+#define reflection_Field_type_identifier "\x8a\x40\x7e\x9f"
+#ifndef reflection_Field_file_extension
+#define reflection_Field_file_extension "bfbs"
+#endif
+#ifndef reflection_Object_file_identifier
+#define reflection_Object_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_Object_file_identifier */
+#ifndef reflection_Object_identifier
+#define reflection_Object_identifier "BFBS"
+#endif
+#define reflection_Object_type_hash ((flatbuffers_thash_t)0xb09729bd)
+#define reflection_Object_type_identifier "\xbd\x29\x97\xb0"
+#ifndef reflection_Object_file_extension
+#define reflection_Object_file_extension "bfbs"
+#endif
+#ifndef reflection_RPCCall_file_identifier
+#define reflection_RPCCall_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_RPCCall_file_identifier */
+#ifndef reflection_RPCCall_identifier
+#define reflection_RPCCall_identifier "BFBS"
+#endif
+#define reflection_RPCCall_type_hash ((flatbuffers_thash_t)0xe2d586f1)
+#define reflection_RPCCall_type_identifier "\xf1\x86\xd5\xe2"
+#ifndef reflection_RPCCall_file_extension
+#define reflection_RPCCall_file_extension "bfbs"
+#endif
+#ifndef reflection_Service_file_identifier
+#define reflection_Service_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_Service_file_identifier */
+#ifndef reflection_Service_identifier
+#define reflection_Service_identifier "BFBS"
+#endif
+#define reflection_Service_type_hash ((flatbuffers_thash_t)0xf31a13b5)
+#define reflection_Service_type_identifier "\xb5\x13\x1a\xf3"
+#ifndef reflection_Service_file_extension
+#define reflection_Service_file_extension "bfbs"
+#endif
+#ifndef reflection_Schema_file_identifier
+#define reflection_Schema_file_identifier "BFBS"
+#endif
+/* deprecated, use reflection_Schema_file_identifier */
+#ifndef reflection_Schema_identifier
+#define reflection_Schema_identifier "BFBS"
+#endif
+#define reflection_Schema_type_hash ((flatbuffers_thash_t)0xfaf93779)
+#define reflection_Schema_type_identifier "\x79\x37\xf9\xfa"
+#ifndef reflection_Schema_file_extension
+#define reflection_Schema_file_extension "bfbs"
+#endif
+
+typedef int8_t reflection_BaseType_enum_t;
+__flatbuffers_define_integer_type(reflection_BaseType, reflection_BaseType_enum_t, 8)
+#define reflection_BaseType_None ((reflection_BaseType_enum_t)INT8_C(0))
+#define reflection_BaseType_UType ((reflection_BaseType_enum_t)INT8_C(1))
+#define reflection_BaseType_Bool ((reflection_BaseType_enum_t)INT8_C(2))
+#define reflection_BaseType_Byte ((reflection_BaseType_enum_t)INT8_C(3))
+#define reflection_BaseType_UByte ((reflection_BaseType_enum_t)INT8_C(4))
+#define reflection_BaseType_Short ((reflection_BaseType_enum_t)INT8_C(5))
+#define reflection_BaseType_UShort ((reflection_BaseType_enum_t)INT8_C(6))
+#define reflection_BaseType_Int ((reflection_BaseType_enum_t)INT8_C(7))
+#define reflection_BaseType_UInt ((reflection_BaseType_enum_t)INT8_C(8))
+#define reflection_BaseType_Long ((reflection_BaseType_enum_t)INT8_C(9))
+#define reflection_BaseType_ULong ((reflection_BaseType_enum_t)INT8_C(10))
+#define reflection_BaseType_Float ((reflection_BaseType_enum_t)INT8_C(11))
+#define reflection_BaseType_Double ((reflection_BaseType_enum_t)INT8_C(12))
+#define reflection_BaseType_String ((reflection_BaseType_enum_t)INT8_C(13))
+#define reflection_BaseType_Vector ((reflection_BaseType_enum_t)INT8_C(14))
+#define reflection_BaseType_Obj ((reflection_BaseType_enum_t)INT8_C(15))
+#define reflection_BaseType_Union ((reflection_BaseType_enum_t)INT8_C(16))
+#define reflection_BaseType_Array ((reflection_BaseType_enum_t)INT8_C(17))
+#define reflection_BaseType_MaxBaseType ((reflection_BaseType_enum_t)INT8_C(18))
+
+static inline const char *reflection_BaseType_name(reflection_BaseType_enum_t value)
+{
+ switch (value) {
+ case reflection_BaseType_None: return "None";
+ case reflection_BaseType_UType: return "UType";
+ case reflection_BaseType_Bool: return "Bool";
+ case reflection_BaseType_Byte: return "Byte";
+ case reflection_BaseType_UByte: return "UByte";
+ case reflection_BaseType_Short: return "Short";
+ case reflection_BaseType_UShort: return "UShort";
+ case reflection_BaseType_Int: return "Int";
+ case reflection_BaseType_UInt: return "UInt";
+ case reflection_BaseType_Long: return "Long";
+ case reflection_BaseType_ULong: return "ULong";
+ case reflection_BaseType_Float: return "Float";
+ case reflection_BaseType_Double: return "Double";
+ case reflection_BaseType_String: return "String";
+ case reflection_BaseType_Vector: return "Vector";
+ case reflection_BaseType_Obj: return "Obj";
+ case reflection_BaseType_Union: return "Union";
+ case reflection_BaseType_Array: return "Array";
+ case reflection_BaseType_MaxBaseType: return "MaxBaseType";
+ default: return "";
+ }
+}
+
+static inline int reflection_BaseType_is_known_value(reflection_BaseType_enum_t value)
+{
+ switch (value) {
+ case reflection_BaseType_None: return 1;
+ case reflection_BaseType_UType: return 1;
+ case reflection_BaseType_Bool: return 1;
+ case reflection_BaseType_Byte: return 1;
+ case reflection_BaseType_UByte: return 1;
+ case reflection_BaseType_Short: return 1;
+ case reflection_BaseType_UShort: return 1;
+ case reflection_BaseType_Int: return 1;
+ case reflection_BaseType_UInt: return 1;
+ case reflection_BaseType_Long: return 1;
+ case reflection_BaseType_ULong: return 1;
+ case reflection_BaseType_Float: return 1;
+ case reflection_BaseType_Double: return 1;
+ case reflection_BaseType_String: return 1;
+ case reflection_BaseType_Vector: return 1;
+ case reflection_BaseType_Obj: return 1;
+ case reflection_BaseType_Union: return 1;
+ case reflection_BaseType_Array: return 1;
+ case reflection_BaseType_MaxBaseType: return 1;
+ default: return 0;
+ }
+}
+
+
+
+struct reflection_Type_table { uint8_t unused__; };
+
+static inline size_t reflection_Type_vec_len(reflection_Type_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_Type_table_t reflection_Type_vec_at(reflection_Type_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_Type_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_Type)
+
+__flatbuffers_define_scalar_field(0, reflection_Type, base_type, reflection_BaseType, reflection_BaseType_enum_t, INT8_C(0))
+__flatbuffers_define_scalar_field(1, reflection_Type, element, reflection_BaseType, reflection_BaseType_enum_t, INT8_C(0))
+__flatbuffers_define_scalar_field(2, reflection_Type, index, flatbuffers_int32, int32_t, INT32_C(-1))
+__flatbuffers_define_scalar_field(3, reflection_Type, fixed_length, flatbuffers_uint16, uint16_t, UINT16_C(0))
+
+struct reflection_KeyValue_table { uint8_t unused__; };
+
+static inline size_t reflection_KeyValue_vec_len(reflection_KeyValue_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_KeyValue_table_t reflection_KeyValue_vec_at(reflection_KeyValue_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_KeyValue_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_KeyValue)
+
+__flatbuffers_define_string_field(0, reflection_KeyValue, key, 1)
+__flatbuffers_define_find_by_string_field(reflection_KeyValue, key)
+__flatbuffers_define_table_sort_by_string_field(reflection_KeyValue, key)
+__flatbuffers_define_default_find_by_string_field(reflection_KeyValue, key)
+__flatbuffers_define_default_scan_by_string_field(reflection_KeyValue, key)
+#define reflection_KeyValue_vec_sort reflection_KeyValue_vec_sort_by_key
+__flatbuffers_define_string_field(1, reflection_KeyValue, value, 0)
+
+struct reflection_EnumVal_table { uint8_t unused__; };
+
+static inline size_t reflection_EnumVal_vec_len(reflection_EnumVal_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_EnumVal_table_t reflection_EnumVal_vec_at(reflection_EnumVal_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_EnumVal_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_EnumVal)
+
+__flatbuffers_define_string_field(0, reflection_EnumVal, name, 1)
+__flatbuffers_define_scalar_field(1, reflection_EnumVal, value, flatbuffers_int64, int64_t, INT64_C(0))
+/* Note: find only works on vectors sorted by this field. */
+__flatbuffers_define_find_by_scalar_field(reflection_EnumVal, value, int64_t)
+__flatbuffers_define_table_sort_by_scalar_field(reflection_EnumVal, value, int64_t)
+__flatbuffers_define_default_find_by_scalar_field(reflection_EnumVal, value, int64_t)
+__flatbuffers_define_default_scan_by_scalar_field(reflection_EnumVal, value, int64_t)
+#define reflection_EnumVal_vec_sort reflection_EnumVal_vec_sort_by_value
+__flatbuffers_define_table_field(2, reflection_EnumVal, object, reflection_Object_table_t, 0)
+__flatbuffers_define_table_field(3, reflection_EnumVal, union_type, reflection_Type_table_t, 0)
+__flatbuffers_define_vector_field(4, reflection_EnumVal, documentation, flatbuffers_string_vec_t, 0)
+
+struct reflection_Enum_table { uint8_t unused__; };
+
+static inline size_t reflection_Enum_vec_len(reflection_Enum_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_Enum_table_t reflection_Enum_vec_at(reflection_Enum_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_Enum_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_Enum)
+
+__flatbuffers_define_string_field(0, reflection_Enum, name, 1)
+__flatbuffers_define_find_by_string_field(reflection_Enum, name)
+__flatbuffers_define_table_sort_by_string_field(reflection_Enum, name)
+__flatbuffers_define_default_find_by_string_field(reflection_Enum, name)
+__flatbuffers_define_default_scan_by_string_field(reflection_Enum, name)
+#define reflection_Enum_vec_sort reflection_Enum_vec_sort_by_name
+__flatbuffers_define_vector_field(1, reflection_Enum, values, reflection_EnumVal_vec_t, 1)
+__flatbuffers_define_scalar_field(2, reflection_Enum, is_union, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
+__flatbuffers_define_table_field(3, reflection_Enum, underlying_type, reflection_Type_table_t, 1)
+__flatbuffers_define_vector_field(4, reflection_Enum, attributes, reflection_KeyValue_vec_t, 0)
+__flatbuffers_define_vector_field(5, reflection_Enum, documentation, flatbuffers_string_vec_t, 0)
+
+struct reflection_Field_table { uint8_t unused__; };
+
+static inline size_t reflection_Field_vec_len(reflection_Field_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_Field_table_t reflection_Field_vec_at(reflection_Field_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_Field_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_Field)
+
+__flatbuffers_define_string_field(0, reflection_Field, name, 1)
+__flatbuffers_define_find_by_string_field(reflection_Field, name)
+__flatbuffers_define_table_sort_by_string_field(reflection_Field, name)
+__flatbuffers_define_default_find_by_string_field(reflection_Field, name)
+__flatbuffers_define_default_scan_by_string_field(reflection_Field, name)
+#define reflection_Field_vec_sort reflection_Field_vec_sort_by_name
+__flatbuffers_define_table_field(1, reflection_Field, type, reflection_Type_table_t, 1)
+__flatbuffers_define_scalar_field(2, reflection_Field, id, flatbuffers_uint16, uint16_t, UINT16_C(0))
+__flatbuffers_define_scalar_field(3, reflection_Field, offset, flatbuffers_uint16, uint16_t, UINT16_C(0))
+__flatbuffers_define_scalar_field(4, reflection_Field, default_integer, flatbuffers_int64, int64_t, INT64_C(0))
+__flatbuffers_define_scalar_field(5, reflection_Field, default_real, flatbuffers_double, double, 0.0000000000000000)
+__flatbuffers_define_scalar_field(6, reflection_Field, deprecated, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
+__flatbuffers_define_scalar_field(7, reflection_Field, required, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
+__flatbuffers_define_scalar_field(8, reflection_Field, key, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
+__flatbuffers_define_vector_field(9, reflection_Field, attributes, reflection_KeyValue_vec_t, 0)
+__flatbuffers_define_vector_field(10, reflection_Field, documentation, flatbuffers_string_vec_t, 0)
+__flatbuffers_define_scalar_field(11, reflection_Field, optional, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
+
+struct reflection_Object_table { uint8_t unused__; };
+
+static inline size_t reflection_Object_vec_len(reflection_Object_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_Object_table_t reflection_Object_vec_at(reflection_Object_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_Object_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_Object)
+
+__flatbuffers_define_string_field(0, reflection_Object, name, 1)
+__flatbuffers_define_find_by_string_field(reflection_Object, name)
+__flatbuffers_define_table_sort_by_string_field(reflection_Object, name)
+__flatbuffers_define_default_find_by_string_field(reflection_Object, name)
+__flatbuffers_define_default_scan_by_string_field(reflection_Object, name)
+#define reflection_Object_vec_sort reflection_Object_vec_sort_by_name
+__flatbuffers_define_vector_field(1, reflection_Object, fields, reflection_Field_vec_t, 1)
+__flatbuffers_define_scalar_field(2, reflection_Object, is_struct, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
+__flatbuffers_define_scalar_field(3, reflection_Object, minalign, flatbuffers_int32, int32_t, INT32_C(0))
+__flatbuffers_define_scalar_field(4, reflection_Object, bytesize, flatbuffers_int32, int32_t, INT32_C(0))
+__flatbuffers_define_vector_field(5, reflection_Object, attributes, reflection_KeyValue_vec_t, 0)
+__flatbuffers_define_vector_field(6, reflection_Object, documentation, flatbuffers_string_vec_t, 0)
+
+struct reflection_RPCCall_table { uint8_t unused__; };
+
+static inline size_t reflection_RPCCall_vec_len(reflection_RPCCall_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_RPCCall_table_t reflection_RPCCall_vec_at(reflection_RPCCall_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_RPCCall_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_RPCCall)
+
+__flatbuffers_define_string_field(0, reflection_RPCCall, name, 1)
+__flatbuffers_define_find_by_string_field(reflection_RPCCall, name)
+__flatbuffers_define_table_sort_by_string_field(reflection_RPCCall, name)
+__flatbuffers_define_default_find_by_string_field(reflection_RPCCall, name)
+__flatbuffers_define_default_scan_by_string_field(reflection_RPCCall, name)
+#define reflection_RPCCall_vec_sort reflection_RPCCall_vec_sort_by_name
+__flatbuffers_define_table_field(1, reflection_RPCCall, request, reflection_Object_table_t, 1)
+__flatbuffers_define_table_field(2, reflection_RPCCall, response, reflection_Object_table_t, 1)
+__flatbuffers_define_vector_field(3, reflection_RPCCall, attributes, reflection_KeyValue_vec_t, 0)
+__flatbuffers_define_vector_field(4, reflection_RPCCall, documentation, flatbuffers_string_vec_t, 0)
+
+struct reflection_Service_table { uint8_t unused__; };
+
+static inline size_t reflection_Service_vec_len(reflection_Service_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_Service_table_t reflection_Service_vec_at(reflection_Service_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_Service_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_Service)
+
+__flatbuffers_define_string_field(0, reflection_Service, name, 1)
+__flatbuffers_define_find_by_string_field(reflection_Service, name)
+__flatbuffers_define_table_sort_by_string_field(reflection_Service, name)
+__flatbuffers_define_default_find_by_string_field(reflection_Service, name)
+__flatbuffers_define_default_scan_by_string_field(reflection_Service, name)
+#define reflection_Service_vec_sort reflection_Service_vec_sort_by_name
+__flatbuffers_define_vector_field(1, reflection_Service, calls, reflection_RPCCall_vec_t, 0)
+__flatbuffers_define_vector_field(2, reflection_Service, attributes, reflection_KeyValue_vec_t, 0)
+__flatbuffers_define_vector_field(3, reflection_Service, documentation, flatbuffers_string_vec_t, 0)
+
+struct reflection_Schema_table { uint8_t unused__; };
+
+static inline size_t reflection_Schema_vec_len(reflection_Schema_vec_t vec)
+__flatbuffers_vec_len(vec)
+static inline reflection_Schema_table_t reflection_Schema_vec_at(reflection_Schema_vec_t vec, size_t i)
+__flatbuffers_offset_vec_at(reflection_Schema_table_t, vec, i, 0)
+__flatbuffers_table_as_root(reflection_Schema)
+
+__flatbuffers_define_vector_field(0, reflection_Schema, objects, reflection_Object_vec_t, 1)
+__flatbuffers_define_vector_field(1, reflection_Schema, enums, reflection_Enum_vec_t, 1)
+__flatbuffers_define_string_field(2, reflection_Schema, file_ident, 0)
+__flatbuffers_define_string_field(3, reflection_Schema, file_ext, 0)
+__flatbuffers_define_table_field(4, reflection_Schema, root_table, reflection_Object_table_t, 0)
+__flatbuffers_define_vector_field(5, reflection_Schema, services, reflection_Service_vec_t, 0)
+
+
+#include "flatcc/flatcc_epilogue.h"
+#endif /* REFLECTION_READER_H */
diff --git a/include/flatcc/reflection/reflection_verifier.h b/include/flatcc/reflection/reflection_verifier.h
new file mode 100644
index 0000000..5b5bd37
--- /dev/null
+++ b/include/flatcc/reflection/reflection_verifier.h
@@ -0,0 +1,308 @@
+#ifndef REFLECTION_VERIFIER_H
+#define REFLECTION_VERIFIER_H
+
+/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */
+
+#ifndef REFLECTION_READER_H
+#include "reflection_reader.h"
+#endif
+#include "flatcc/flatcc_verifier.h"
+#include "flatcc/flatcc_prologue.h"
+
+static int reflection_Type_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_EnumVal_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_Enum_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_Field_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_Object_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_RPCCall_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_Service_verify_table(flatcc_table_verifier_descriptor_t *td);
+static int reflection_Schema_verify_table(flatcc_table_verifier_descriptor_t *td);
+
+static int reflection_Type_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_field(td, 0, 1, 1) /* base_type */)) return ret;
+ if ((ret = flatcc_verify_field(td, 1, 1, 1) /* element */)) return ret;
+ if ((ret = flatcc_verify_field(td, 2, 4, 4) /* index */)) return ret;
+ if ((ret = flatcc_verify_field(td, 3, 2, 2) /* fixed_length */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_Type_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Type_identifier, &reflection_Type_verify_table);
+}
+
+static inline int reflection_Type_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Type_type_identifier, &reflection_Type_verify_table);
+}
+
+static inline int reflection_Type_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Type_verify_table);
+}
+
+static inline int reflection_Type_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_Type_verify_table);
+}
+
+static int reflection_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_string_field(td, 0, 1) /* key */)) return ret;
+ if ((ret = flatcc_verify_string_field(td, 1, 0) /* value */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_KeyValue_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_KeyValue_identifier, &reflection_KeyValue_verify_table);
+}
+
+static inline int reflection_KeyValue_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_KeyValue_type_identifier, &reflection_KeyValue_verify_table);
+}
+
+static inline int reflection_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_KeyValue_verify_table);
+}
+
+static inline int reflection_KeyValue_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_KeyValue_verify_table);
+}
+
+static int reflection_EnumVal_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_string_field(td, 0, 1) /* name */)) return ret;
+ if ((ret = flatcc_verify_field(td, 1, 8, 8) /* value */)) return ret;
+ if ((ret = flatcc_verify_table_field(td, 2, 0, &reflection_Object_verify_table) /* object */)) return ret;
+ if ((ret = flatcc_verify_table_field(td, 3, 0, &reflection_Type_verify_table) /* union_type */)) return ret;
+ if ((ret = flatcc_verify_string_vector_field(td, 4, 0) /* documentation */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_EnumVal_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_EnumVal_identifier, &reflection_EnumVal_verify_table);
+}
+
+static inline int reflection_EnumVal_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_EnumVal_type_identifier, &reflection_EnumVal_verify_table);
+}
+
+static inline int reflection_EnumVal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_EnumVal_verify_table);
+}
+
+static inline int reflection_EnumVal_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_EnumVal_verify_table);
+}
+
+static int reflection_Enum_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_string_field(td, 0, 1) /* name */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 1, 1, &reflection_EnumVal_verify_table) /* values */)) return ret;
+ if ((ret = flatcc_verify_field(td, 2, 1, 1) /* is_union */)) return ret;
+ if ((ret = flatcc_verify_table_field(td, 3, 1, &reflection_Type_verify_table) /* underlying_type */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 4, 0, &reflection_KeyValue_verify_table) /* attributes */)) return ret;
+ if ((ret = flatcc_verify_string_vector_field(td, 5, 0) /* documentation */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_Enum_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Enum_identifier, &reflection_Enum_verify_table);
+}
+
+static inline int reflection_Enum_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Enum_type_identifier, &reflection_Enum_verify_table);
+}
+
+static inline int reflection_Enum_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Enum_verify_table);
+}
+
+static inline int reflection_Enum_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_Enum_verify_table);
+}
+
+static int reflection_Field_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_string_field(td, 0, 1) /* name */)) return ret;
+ if ((ret = flatcc_verify_table_field(td, 1, 1, &reflection_Type_verify_table) /* type */)) return ret;
+ if ((ret = flatcc_verify_field(td, 2, 2, 2) /* id */)) return ret;
+ if ((ret = flatcc_verify_field(td, 3, 2, 2) /* offset */)) return ret;
+ if ((ret = flatcc_verify_field(td, 4, 8, 8) /* default_integer */)) return ret;
+ if ((ret = flatcc_verify_field(td, 5, 8, 8) /* default_real */)) return ret;
+ if ((ret = flatcc_verify_field(td, 6, 1, 1) /* deprecated */)) return ret;
+ if ((ret = flatcc_verify_field(td, 7, 1, 1) /* required */)) return ret;
+ if ((ret = flatcc_verify_field(td, 8, 1, 1) /* key */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 9, 0, &reflection_KeyValue_verify_table) /* attributes */)) return ret;
+ if ((ret = flatcc_verify_string_vector_field(td, 10, 0) /* documentation */)) return ret;
+ if ((ret = flatcc_verify_field(td, 11, 1, 1) /* optional */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_Field_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Field_identifier, &reflection_Field_verify_table);
+}
+
+static inline int reflection_Field_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Field_type_identifier, &reflection_Field_verify_table);
+}
+
+static inline int reflection_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Field_verify_table);
+}
+
+static inline int reflection_Field_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_Field_verify_table);
+}
+
+static int reflection_Object_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_string_field(td, 0, 1) /* name */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 1, 1, &reflection_Field_verify_table) /* fields */)) return ret;
+ if ((ret = flatcc_verify_field(td, 2, 1, 1) /* is_struct */)) return ret;
+ if ((ret = flatcc_verify_field(td, 3, 4, 4) /* minalign */)) return ret;
+ if ((ret = flatcc_verify_field(td, 4, 4, 4) /* bytesize */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 5, 0, &reflection_KeyValue_verify_table) /* attributes */)) return ret;
+ if ((ret = flatcc_verify_string_vector_field(td, 6, 0) /* documentation */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_Object_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Object_identifier, &reflection_Object_verify_table);
+}
+
+static inline int reflection_Object_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Object_type_identifier, &reflection_Object_verify_table);
+}
+
+static inline int reflection_Object_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Object_verify_table);
+}
+
+static inline int reflection_Object_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_Object_verify_table);
+}
+
+static int reflection_RPCCall_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_string_field(td, 0, 1) /* name */)) return ret;
+ if ((ret = flatcc_verify_table_field(td, 1, 1, &reflection_Object_verify_table) /* request */)) return ret;
+ if ((ret = flatcc_verify_table_field(td, 2, 1, &reflection_Object_verify_table) /* response */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 3, 0, &reflection_KeyValue_verify_table) /* attributes */)) return ret;
+ if ((ret = flatcc_verify_string_vector_field(td, 4, 0) /* documentation */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_RPCCall_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_RPCCall_identifier, &reflection_RPCCall_verify_table);
+}
+
+static inline int reflection_RPCCall_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_RPCCall_type_identifier, &reflection_RPCCall_verify_table);
+}
+
+static inline int reflection_RPCCall_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_RPCCall_verify_table);
+}
+
+static inline int reflection_RPCCall_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_RPCCall_verify_table);
+}
+
+static int reflection_Service_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_string_field(td, 0, 1) /* name */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 1, 0, &reflection_RPCCall_verify_table) /* calls */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 2, 0, &reflection_KeyValue_verify_table) /* attributes */)) return ret;
+ if ((ret = flatcc_verify_string_vector_field(td, 3, 0) /* documentation */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_Service_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Service_identifier, &reflection_Service_verify_table);
+}
+
+static inline int reflection_Service_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Service_type_identifier, &reflection_Service_verify_table);
+}
+
+static inline int reflection_Service_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Service_verify_table);
+}
+
+static inline int reflection_Service_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_Service_verify_table);
+}
+
+static int reflection_Schema_verify_table(flatcc_table_verifier_descriptor_t *td)
+{
+ int ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 0, 1, &reflection_Object_verify_table) /* objects */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 1, 1, &reflection_Enum_verify_table) /* enums */)) return ret;
+ if ((ret = flatcc_verify_string_field(td, 2, 0) /* file_ident */)) return ret;
+ if ((ret = flatcc_verify_string_field(td, 3, 0) /* file_ext */)) return ret;
+ if ((ret = flatcc_verify_table_field(td, 4, 0, &reflection_Object_verify_table) /* root_table */)) return ret;
+ if ((ret = flatcc_verify_table_vector_field(td, 5, 0, &reflection_Service_verify_table) /* services */)) return ret;
+ return flatcc_verify_ok;
+}
+
+static inline int reflection_Schema_verify_as_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Schema_identifier, &reflection_Schema_verify_table);
+}
+
+static inline int reflection_Schema_verify_as_typed_root(const void *buf, size_t bufsiz)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, reflection_Schema_type_identifier, &reflection_Schema_verify_table);
+}
+
+static inline int reflection_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
+{
+ return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Schema_verify_table);
+}
+
+static inline int reflection_Schema_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
+{
+ return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &reflection_Schema_verify_table);
+}
+
+#include "flatcc/flatcc_epilogue.h"
+#endif /* REFLECTION_VERIFIER_H */