gwenhywfar 5.12.0
buildctx_xml.c File Reference
#include "gwenbuild/buildctx/buildctx_p.h"
#include "gwenbuild/buildctx/buildctx_xml.h"
#include <gwenhywfar/debug.h>
#include <gwenhywfar/text.h>
#include <gwenhywfar/directory.h>
#include <unistd.h>
#include <ctype.h>
Include dependency graph for buildctx_xml.c:

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG

Functions

static void _readCommandsFromXml (GWB_BUILD_CONTEXT *bctx, GWEN_XMLNODE *xmlNode, const char *groupName)
static void _readFilesFromXml (GWEN_XMLNODE *xmlNode, const char *groupName, GWB_FILE_LIST2 *destFileList)
static uint32_t _readFlagsFromChar (const char *flagsAsText)
static void _writeCommandList2ToXml (const GWB_BUILD_CMD_LIST2 *commandList, GWEN_XMLNODE *xmlNode, const char *groupName)
static void _writeFileFlagsToXml (uint32_t flags, GWEN_XMLNODE *xmlNode, const char *varName)
static void _writeFileList2ToXml (const GWB_FILE_LIST2 *fileList, GWEN_XMLNODE *xmlNode, const char *groupName)
GWB_BUILD_CONTEXTGWB_BuildCtx_fromXml (GWEN_XMLNODE *xmlNode)
GWB_BUILD_CONTEXTGWB_BuildCtx_ReadFromXmlFile (const char *fileName)
void GWB_BuildCtx_toXml (const GWB_BUILD_CONTEXT *bctx, GWEN_XMLNODE *xmlNode)
int GWB_BuildCtx_WriteToXmlFile (const GWB_BUILD_CONTEXT *buildCtx, const char *fileName)

Macro Definition Documentation

◆ DISABLE_DEBUGLOG

#define DISABLE_DEBUGLOG

Definition at line 14 of file buildctx_xml.c.

Function Documentation

◆ _readCommandsFromXml()

void _readCommandsFromXml ( GWB_BUILD_CONTEXT * bctx,
GWEN_XMLNODE * xmlNode,
const char * groupName )
static

Definition at line 182 of file buildctx_xml.c.

References GWB_BuildCmd_fromXml(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), and NULL.

Referenced by GWB_BuildCtx_fromXml().

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

◆ _readFilesFromXml()

void _readFilesFromXml ( GWEN_XMLNODE * xmlNode,
const char * groupName,
GWB_FILE_LIST2 * destFileList )
static

Definition at line 198 of file buildctx_xml.c.

References _readFlagsFromChar(), DBG_ERROR, GWB_File_new(), GWB_File_SetFileType(), GWB_File_SetFlags(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), GWEN_XMLNode_GetCharValue(), GWEN_XMLNode_GetIntProperty(), and NULL.

Referenced by GWB_BuildCtx_fromXml().

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

◆ _readFlagsFromChar()

uint32_t _readFlagsFromChar ( const char * flagsAsText)
static

Definition at line 238 of file buildctx_xml.c.

References DBG_ERROR, GWB_FILE_FLAGS_DIST, GWB_FILE_FLAGS_GENERATED, GWB_FILE_FLAGS_INSTALL, GWEN_StringList_FirstEntry(), GWEN_StringList_free(), GWEN_StringList_fromString(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), and NULL.

Referenced by _readFilesFromXml().

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

◆ _writeCommandList2ToXml()

void _writeCommandList2ToXml ( const GWB_BUILD_CMD_LIST2 * commandList,
GWEN_XMLNODE * xmlNode,
const char * groupName )
static

Definition at line 91 of file buildctx_xml.c.

References GWB_BuildCmd_toXml(), GWEN_XMLNode_AddChild(), GWEN_XMLNode_new(), and GWEN_XMLNodeTypeTag.

Referenced by GWB_BuildCtx_toXml().

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

◆ _writeFileFlagsToXml()

void _writeFileFlagsToXml ( uint32_t flags,
GWEN_XMLNODE * xmlNode,
const char * varName )
static

Definition at line 150 of file buildctx_xml.c.

References GWB_FILE_FLAGS_DIST, GWB_FILE_FLAGS_GENERATED, GWB_FILE_FLAGS_INSTALL, GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_new(), and GWEN_XMLNode_SetCharValue().

Referenced by _writeFileList2ToXml().

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

◆ _writeFileList2ToXml()

void _writeFileList2ToXml ( const GWB_FILE_LIST2 * fileList,
GWEN_XMLNODE * xmlNode,
const char * groupName )
static

◆ GWB_BuildCtx_fromXml()

GWB_BUILD_CONTEXT * GWB_BuildCtx_fromXml ( GWEN_XMLNODE * xmlNode)

Definition at line 66 of file buildctx_xml.c.

References _readCommandsFromXml(), _readFilesFromXml(), GWB_BuildCtx_new(), GWB_BuildCtx_SetInitialSourceDir(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_GetCharValue(), and NULL.

Referenced by GWB_BuildCtx_ReadFromXmlFile().

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

◆ GWB_BuildCtx_ReadFromXmlFile()

GWB_BUILD_CONTEXT * GWB_BuildCtx_ReadFromXmlFile ( const char * fileName)

Definition at line 273 of file buildctx_xml.c.

References DBG_ERROR, GWB_BuildCtx_fromXml(), GWEN_XML_FLAGS_DEFAULT, GWEN_XML_FLAGS_SIMPLE, GWEN_XML_ReadFile(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_free(), GWEN_XMLNode_new(), GWEN_XMLNodeTypeTag, and NULL.

Referenced by GWB_Build(), and GWB_Prepare().

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

◆ GWB_BuildCtx_toXml()

void GWB_BuildCtx_toXml ( const GWB_BUILD_CONTEXT * bctx,
GWEN_XMLNODE * xmlNode )

Definition at line 42 of file buildctx_xml.c.

References _writeCommandList2ToXml(), _writeFileList2ToXml(), GWEN_XMLNode_AddChild(), GWEN_XMLNode_new(), GWEN_XMLNode_SetCharValue(), and GWEN_XMLNodeTypeTag.

Referenced by GWB_BuildCtx_WriteToXmlFile().

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

◆ GWB_BuildCtx_WriteToXmlFile()

int GWB_BuildCtx_WriteToXmlFile ( const GWB_BUILD_CONTEXT * buildCtx,
const char * fileName )

Definition at line 303 of file buildctx_xml.c.

References DBG_ERROR, GWB_BuildCtx_toXml(), GWEN_XML_FLAGS_DEFAULT, GWEN_XML_FLAGS_SIMPLE, GWEN_XMLNode_AddChild(), GWEN_XMLNode_free(), GWEN_XMLNode_new(), GWEN_XMLNode_WriteFile(), GWEN_XMLNodeTypeTag, and NULL.

Referenced by GWB_Setup().

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