json-gen-c  0.1.5
json-gen-c generate C code for json manipulation
gencode.h File Reference

generate json manipulate codes. More...

#include "utils/hash_map.h"
#include "utils/sstr.h"
Include dependency graph for gencode.h:

Go to the source code of this file.

Macros

#define OUTPUT_C_FILENAME   "json.gen.c"
 
#define OUTPUT_H_FILENAME   "json.gen.h"
 

Functions

int gencode_source (struct hash_map *struct_map, sstr_t source, sstr_t header)
 generate json manipulate codes by struct_map into source and header. More...
 

Detailed Description

generate json manipulate codes.

Author
your name (you@d.nosp@m.omai.nosp@m.n.com)

Function Documentation

◆ gencode_source()

int gencode_source ( struct hash_map struct_map,
sstr_t  source,
sstr_t  header 
)

generate json manipulate codes by struct_map into source and header.

Parameters
struct_mapthe hash map that store all structs parsed from struct defintion files.
sourcethe output source code.
headerthe output header code.
Returns
int 0 if success, -1 if failed.