gwenhywfar 5.12.0
main.c File Reference
#include "args.h"
#include "typemaker_p.h"
#include <gwenhywfar/debug.h>
#include <gwenhywfar/logger.h>
#include <gwenhywfar/xml.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <ctype.h>
Include dependency graph for typemaker/main.c:

Go to the source code of this file.

Macros

#define I18N(m)
#define I18S(m)

Functions

const char * get_function_name (GWEN_XMLNODE *node, const char *ftype)
const char * get_function_name2 (GWEN_XMLNODE *node, const char *ftype, const char *name)
const char * get_property (GWEN_XMLNODE *node, const char *pname, const char *defval)
GWEN_XMLNODEget_struct_node (GWEN_XMLNODE *node)
const char * get_struct_property (GWEN_XMLNODE *node, const char *pname, const char *defval)
GWEN_XMLNODEget_typedef (GWEN_XMLNODE *node, const char *name)
int main (int argc, char **argv)
int write_apidoc_c (ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc)
int write_apidocrec_c (ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc, int level)
int write_files (ARGUMENTS *args, GWEN_XMLNODE *node)
int write_h_enums (ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc)
int write_h_funcs (GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc)
int write_h_header (GWEN_UNUSED ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, GWEN_UNUSED const char *where)
int write_h_setget_c (ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio, const char *acc)
void write_if_nonnull (GWEN_SYNCIO *sio, const char *str)
int write_xml_to_bio (GWEN_XMLNODE *n, GWEN_SYNCIO *sio, uint32_t flags)

Macro Definition Documentation

◆ I18N

#define I18N ( m)
Value:
m

Definition at line 21 of file typemaker/main.c.

◆ I18S

#define I18S ( m)
Value:
m

Definition at line 22 of file typemaker/main.c.

Function Documentation

◆ get_function_name()

const char * get_function_name ( GWEN_XMLNODE * node,
const char * ftype )

Definition at line 1036 of file typemaker/main.c.

References DBG_ERROR, GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_GetParent(), and GWEN_XMLNode_GetProperty().

Referenced by write_code_constrec_c(), write_code_dupArg_c(), write_code_duprec_c(), write_code_freeElem_c(), write_code_fromdbArg_c(), and write_code_todbArg_c().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_function_name2()

const char * get_function_name2 ( GWEN_XMLNODE * node,
const char * ftype,
const char * name )

Definition at line 1006 of file typemaker/main.c.

References GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_GetParent(), and GWEN_XMLNode_GetProperty().

Here is the call graph for this function:

◆ get_property()

const char * get_property ( GWEN_XMLNODE * node,
const char * pname,
const char * defval )

◆ get_struct_node()

GWEN_XMLNODE * get_struct_node ( GWEN_XMLNODE * node)

Definition at line 1174 of file typemaker/main.c.

References GWEN_XMLNode_GetData(), GWEN_XMLNode_GetParent(), GWEN_XMLNode_GetType(), and GWEN_XMLNodeTypeTag.

Referenced by get_typedef().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_struct_property()

◆ get_typedef()

GWEN_XMLNODE * get_typedef ( GWEN_XMLNODE * node,
const char * name )

Definition at line 1079 of file typemaker/main.c.

References get_struct_node(), GWEN_XMLNode_FindFirstTag(), and GWEN_XMLNode_GetParent().

Referenced by write_code_dupList_c(), write_code_fromdbArg_c(), write_code_fromdbrec_c(), write_code_setget_c(), write_code_todbArg_c(), write_h_elem_c(), and write_h_setget_c().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

◆ write_apidoc_c()

int write_apidoc_c ( ARGUMENTS * args,
GWEN_XMLNODE * node,
GWEN_SYNCIO * sio,
const char * acc )

◆ write_apidocrec_c()

◆ write_files()

int write_files ( ARGUMENTS * args,
GWEN_XMLNODE * node )

Definition at line 967 of file typemaker/main.c.

References DBG_INFO, DBG_WARN, GWEN_XMLNode_FindFirstTag(), write_code_files_c(), write_ha_files_c(), write_hl_files_c(), and write_hp_files_c().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_h_enums()

◆ write_h_funcs()

int write_h_funcs ( GWEN_UNUSED ARGUMENTS * args,
GWEN_XMLNODE * node,
GWEN_SYNCIO * sio,
const char * acc )

Definition at line 640 of file typemaker/main.c.

References DBG_ERROR, get_property(), get_struct_property(), GWEN_SyncIo_WriteLine(), GWEN_SyncIo_WriteString(), GWEN_UNUSED, GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), and GWEN_XMLNode_GetProperty().

Referenced by write_h_struct_c(), write_ha_file_c(), and write_hl_file_c().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_h_header()

int write_h_header ( GWEN_UNUSED ARGUMENTS * args,
GWEN_XMLNODE * node,
GWEN_SYNCIO * sio,
GWEN_UNUSED const char * where )

Definition at line 67 of file typemaker/main.c.

References DBG_ERROR, DBG_ERROR_ERR, GWEN_SyncIo_WriteLine(), GWEN_SyncIo_WriteString(), GWEN_UNUSED, GWEN_XMLNode_GetData(), GWEN_XMLNode_GetFirstData(), and GWEN_XMLNode_GetProperty().

Referenced by write_code_file_c(), and write_hp_group_c().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_h_setget_c()

◆ write_if_nonnull()

void write_if_nonnull ( GWEN_SYNCIO * sio,
const char * str )

Definition at line 136 of file typemaker/main.c.

References GWEN_SyncIo_WriteString().

Referenced by write_h_enums(), and write_h_setget_c().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_xml_to_bio()

int write_xml_to_bio ( GWEN_XMLNODE * n,
GWEN_SYNCIO * sio,
uint32_t flags )

Definition at line 44 of file typemaker/main.c.

References DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_new(), GWEN_SyncIo_WriteForced(), and GWEN_XMLNode_toBuffer().

Referenced by write_apidoc_c(), write_apidocrec_c(), write_h_enums(), and write_h_setget_c().

Here is the call graph for this function:
Here is the caller graph for this function: