|
json-gen-c
0.1.5
json-gen-c generate C code for json manipulation
|
Generate a C++ wrapper header (.gen.hpp) providing RAII classes around the generated C structs, with typed accessors and marshal/unmarshal member functions. More...
#include "gencode/gencode.h"#include "struct/struct_parse.h"#include "utils/hash_map.h"#include "utils/sstr.h"#include <stdio.h>#include <string.h>
Classes | |
| struct | cpp_gen_param |
Functions | |
| int | gencode_cpp_wrapper (struct hash_map *struct_map, struct hash_map *enum_map, struct hash_map *oneof_map, const char *c_header_name, int format, sstr_t output) |
| generate C++ wrapper header (.gen.hpp) that provides RAII classes around the generated C structs. | |
Generate a C++ wrapper header (.gen.hpp) providing RAII classes around the generated C structs, with typed accessors and marshal/unmarshal member functions.
| int gencode_cpp_wrapper | ( | struct hash_map * | struct_map, |
| struct hash_map * | enum_map, | ||
| struct hash_map * | oneof_map, | ||
| const char * | c_header_name, | ||
| int | format, | ||
| sstr_t | output | ||
| ) |
generate C++ wrapper header (.gen.hpp) that provides RAII classes around the generated C structs.
| struct_map | parsed struct definitions. |
| enum_map | parsed enum definitions. |
| oneof_map | parsed oneof (tagged union) definitions. |
| c_header_name | filename of the generated C header to include. |
| format | output format (0=json, 1=msgpack, 2=cbor) for marshal prefix. |
| output | the output C++ header content. |