// import 'macros.c' as macros
#pragma once

/* Generated by xpdt
 * xpdt is written by Gianni Tedesco
 * https://github.com/giannitedesco/xpdt
 */

/*# for hdr in headers #*/
#include /*{hdr.path_spec}*/
/*# endfor #*/

/* ==== structs ==== */

/*#- for struct in namespace #*/

/*{macros.api_struct_decl(struct)}*/
/*# if struct.needs_vbuf #*/
/*{macros.fixed_struct_decl(struct)}*/
/*# endif #*/
/*{macros.len_wrapped_struct_decl(struct)}*/
/*# if struct.needs_vbuf #*/
/*{macros.vbuf_struct_decl(struct)}*/
/*# endif #*/
/*#- endfor #*/
/*# for struct in namespace #*/

/* ==== construct: /*{struct.name}*/ ==== */
/*{macros.ctor_defn(struct)}*/
// if struct.needs_vbuf
/*{macros.fixed_ctor_defn(struct)}*/
/*{macros.ptrs_ctor_defn(struct)}*/
/*{macros.obj_ptrs_ctor_defn(struct)}*/
// endif
/*#- endfor #*/
/*# for struct in namespace #*/

/* ==== write: /*{struct.name}*/ ==== */
/*# if struct.needs_vbuf #*/
/*{macros.write_bufreq_func(struct)}*/
/*# endif #*/
/*{macros.write_sized_func(struct)}*/
/*{macros.write_fixed_func(struct)}*/
/*# if struct.has_discriminant #*/
/*{macros.write_wrapped_func(struct)}*/
/*# endif #*/

/*# if struct.needs_vbuf #*/
#define /*{macros.wr(struct)}*/ /*{macros.wr_sized(struct)}*/
#define /*{macros.write(struct)}*/ /*{macros.write_sized(struct)}*/
/*# else #*/
#define /*{macros.wr(struct)}*/ /*{macros.wr_fixed(struct)}*/
#define /*{macros.write(struct)}*/ /*{macros.write_fixed(struct)}*/
/*# endif #*/
/*#- endfor #*/
/*# for struct in namespace #*/

/* ==== read: /*{struct.name}*/ ==== */
/*{macros.readers(struct)}*/

/*# if struct.needs_vbuf #*/
#define /*{macros.rd(struct)}*/ /*{macros.rd_sized(struct)}*/
/*# else #*/
#define /*{macros.rd(struct)}*/ /*{macros.rd_fixed(struct)}*/
/*# endif #*/
/*#- endfor #*/
