gwenhywfar 5.10.1
Typedefs | Functions
keyvaluepair.h File Reference
#include <gwenhywfar/list1.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/xml.h>
Include dependency graph for keyvaluepair.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct GWB_KEYVALUEPAIR GWB_KEYVALUEPAIR
 

Functions

GWB_KEYVALUEPAIRGWB_KeyValuePair_dup (const GWB_KEYVALUEPAIR *originalKvp)
 
void GWB_KeyValuePair_free (GWB_KEYVALUEPAIR *kvp)
 
const char * GWB_KeyValuePair_GetKey (const GWB_KEYVALUEPAIR *kvp)
 
const char * GWB_KeyValuePair_GetValue (const GWB_KEYVALUEPAIR *kvp)
 
GWB_KEYVALUEPAIR_LIST * GWB_KeyValuePair_List_dup (const GWB_KEYVALUEPAIR_LIST *kvpList)
 
GWB_KEYVALUEPAIRGWB_KeyValuePair_List_GetFirstByKey (const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key)
 
GWB_KEYVALUEPAIRGWB_KeyValuePair_List_GetNextByKey (const GWB_KEYVALUEPAIR *kvp, const char *key)
 
const char * GWB_KeyValuePair_List_GetValue (const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key)
 
int GWB_KeyValuePair_List_SampleValuesByKey (const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key, const char *prefix, const char *delim, GWEN_BUFFER *destBuf)
 
int GWB_KeyValuePair_List_WriteAllPairsToBuffer (const GWB_KEYVALUEPAIR_LIST *kvpList, const char *prefix, const char *assignmentString, const char *delim, GWEN_BUFFER *destBuf)
 
void GWB_KeyValuePair_List_WriteXml (const GWB_KEYVALUEPAIR_LIST *kvpList, GWEN_XMLNODE *xmlNode, const char *groupName)
 
GWB_KEYVALUEPAIRGWB_KeyValuePair_new (const char *key, const char *value)
 
void GWB_KeyValuePair_SetKey (GWB_KEYVALUEPAIR *kvp, const char *s)
 
void GWB_KeyValuePair_SetValue (GWB_KEYVALUEPAIR *kvp, const char *s)
 
void GWB_KeyValuePair_toXml (const GWB_KEYVALUEPAIR *kvp, GWEN_XMLNODE *xmlNode)
 

Typedef Documentation

◆ GWB_KEYVALUEPAIR

Definition at line 19 of file keyvaluepair.h.

Function Documentation

◆ GWB_KeyValuePair_dup()

GWB_KEYVALUEPAIR * GWB_KeyValuePair_dup ( const GWB_KEYVALUEPAIR originalKvp)

Definition at line 51 of file keyvaluepair.c.

References GWB_KeyValuePair_SetKey(), GWB_KeyValuePair_SetValue(), GWEN_LIST_INIT, and GWEN_NEW_OBJECT.

Referenced by GWB_KeyValuePair_List_dup().

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

◆ GWB_KeyValuePair_free()

void GWB_KeyValuePair_free ( GWB_KEYVALUEPAIR kvp)

Definition at line 68 of file keyvaluepair.c.

References GWEN_FREE_OBJECT.

Referenced by _checkAgainstGivenOption().

Here is the caller graph for this function:

◆ GWB_KeyValuePair_GetKey()

const char * GWB_KeyValuePair_GetKey ( const GWB_KEYVALUEPAIR kvp)

Definition at line 79 of file keyvaluepair.c.

Referenced by GWB_InstallFiles(), GWB_Utils_WriteInstallFileList(), and GWBUILD_Debug_PrintKvpList().

Here is the caller graph for this function:

◆ GWB_KeyValuePair_GetValue()

const char * GWB_KeyValuePair_GetValue ( const GWB_KEYVALUEPAIR kvp)

Definition at line 97 of file keyvaluepair.c.

Referenced by _checkAgainstGivenOption(), GWB_InstallFiles(), GWB_Utils_WriteInstallFileList(), and GWBUILD_Debug_PrintKvpList().

Here is the caller graph for this function:

◆ GWB_KeyValuePair_List_dup()

GWB_KEYVALUEPAIR_LIST * GWB_KeyValuePair_List_dup ( const GWB_KEYVALUEPAIR_LIST *  kvpList)

Definition at line 115 of file keyvaluepair.c.

References GWB_KeyValuePair_dup().

Referenced by GWB_Context_dup().

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

◆ GWB_KeyValuePair_List_GetFirstByKey()

GWB_KEYVALUEPAIR * GWB_KeyValuePair_List_GetFirstByKey ( const GWB_KEYVALUEPAIR_LIST *  kvpList,
const char *  key 
)

Definition at line 144 of file keyvaluepair.c.

References _getByKey().

Referenced by _checkAgainstGivenOption(), GWB_Context_SetDefine(), GWB_KeyValuePair_List_GetValue(), GWB_KeyValuePair_List_SampleValuesByKey(), and GWB_Project_SetDefine().

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

◆ GWB_KeyValuePair_List_GetNextByKey()

GWB_KEYVALUEPAIR * GWB_KeyValuePair_List_GetNextByKey ( const GWB_KEYVALUEPAIR kvp,
const char *  key 
)

Definition at line 151 of file keyvaluepair.c.

References _getByKey(), and NULL.

Referenced by GWB_KeyValuePair_List_SampleValuesByKey().

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

◆ GWB_KeyValuePair_List_GetValue()

const char * GWB_KeyValuePair_List_GetValue ( const GWB_KEYVALUEPAIR_LIST *  kvpList,
const char *  key 
)

Definition at line 132 of file keyvaluepair.c.

References GWB_KeyValuePair_List_GetFirstByKey(), and NULL.

Referenced by GWB_Option_GetAlias(), and GWB_Project_GetGivenOption().

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

◆ GWB_KeyValuePair_List_SampleValuesByKey()

int GWB_KeyValuePair_List_SampleValuesByKey ( const GWB_KEYVALUEPAIR_LIST *  kvpList,
const char *  key,
const char *  prefix,
const char *  delim,
GWEN_BUFFER destBuf 
)

Definition at line 173 of file keyvaluepair.c.

References GWB_KeyValuePair_List_GetFirstByKey(), GWB_KeyValuePair_List_GetNextByKey(), and GWEN_Buffer_AppendString().

Referenced by _readArgsIncludes().

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

◆ GWB_KeyValuePair_List_WriteAllPairsToBuffer()

int GWB_KeyValuePair_List_WriteAllPairsToBuffer ( const GWB_KEYVALUEPAIR_LIST *  kvpList,
const char *  prefix,
const char *  assignmentString,
const char *  delim,
GWEN_BUFFER destBuf 
)

Adds all key-value-pairs to the given buffer.

If you want to use the given key-value-pairs as DEFINEs for a compiler input you can set the following values to the arguments: prefix="-D" assignmentString="=" delim=" " (space), resulting in "-DKEY1=VALUE1 -DKEY2=VALUE2".

Returns
number of entries added to the buffer
Parameters
kvpListlist of key-value-pairs to add
prefixstring to prepend before adding each key-value-pair
assignmentStringassignment chars (e.g. "=", ":=" etc)
delimdelimiter between each pair
destBufbuffer to write to

Definition at line 199 of file keyvaluepair.c.

References GWEN_Buffer_AppendString().

Referenced by _readArgsDefines(), and _writeConfigH().

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

◆ GWB_KeyValuePair_List_WriteXml()

void GWB_KeyValuePair_List_WriteXml ( const GWB_KEYVALUEPAIR_LIST *  kvpList,
GWEN_XMLNODE xmlNode,
const char *  groupName 
)

Definition at line 240 of file keyvaluepair.c.

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

Referenced by GWB_Context_toXml(), and GWB_Project_toXml().

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

◆ GWB_KeyValuePair_new()

GWB_KEYVALUEPAIR * GWB_KeyValuePair_new ( const char *  key,
const char *  value 
)

◆ GWB_KeyValuePair_SetKey()

void GWB_KeyValuePair_SetKey ( GWB_KEYVALUEPAIR kvp,
const char *  s 
)

Definition at line 86 of file keyvaluepair.c.

References NULL.

Referenced by GWB_KeyValuePair_dup(), and GWB_KeyValuePair_new().

Here is the caller graph for this function:

◆ GWB_KeyValuePair_SetValue()

void GWB_KeyValuePair_SetValue ( GWB_KEYVALUEPAIR kvp,
const char *  s 
)

Definition at line 104 of file keyvaluepair.c.

References NULL.

Referenced by GWB_Context_SetDefine(), GWB_KeyValuePair_dup(), GWB_KeyValuePair_new(), and GWB_Project_SetDefine().

Here is the caller graph for this function:

◆ GWB_KeyValuePair_toXml()

void GWB_KeyValuePair_toXml ( const GWB_KEYVALUEPAIR kvp,
GWEN_XMLNODE xmlNode 
)

Definition at line 230 of file keyvaluepair.c.

References GWEN_XMLNode_SetCharValue().

Referenced by GWB_KeyValuePair_List_WriteXml().

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