gwenhywfar 5.10.1
Typedefs | Enumerations | Functions
option.h File Reference
#include <gwenhywfar/list1.h>
#include <gwenhywfar/stringlist.h>
#include "gwenbuild/types/keyvaluepair.h"
Include dependency graph for option.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct GWB_OPTION GWB_OPTION
 

Enumerations

enum  { GWB_OptionType_Unknown =-1 , GWB_OptionType_None =0 , GWB_OptionType_String , GWB_OptionType_StringList }
 

Functions

void GWB_Option_AddAlias (GWB_OPTION *option, const char *name, const char *value)
 
void GWB_Option_AddChoice (GWB_OPTION *option, const char *s)
 
void GWB_Option_Dump (const GWB_OPTION *option, int indent)
 
void GWB_Option_free (GWB_OPTION *option)
 
const char * GWB_Option_GetAlias (const GWB_OPTION *option, const char *name)
 
GWB_KEYVALUEPAIR_LIST * GWB_Option_GetAliasList (const GWB_OPTION *option)
 
GWEN_STRINGLISTGWB_Option_GetChoiceList (const GWB_OPTION *option)
 
const char * GWB_Option_GetDefaultValue (const GWB_OPTION *option)
 
const char * GWB_Option_GetDefinePrefix (const GWB_OPTION *option)
 
const char * GWB_Option_GetId (const GWB_OPTION *option)
 
int GWB_Option_GetOptionType (const GWB_OPTION *option)
 
int GWB_Option_HasChoices (const GWB_OPTION *option)
 
int GWB_Option_IsValidChoice (const GWB_OPTION *option, const char *s)
 
GWB_OPTIONGWB_Option_new (const char *id)
 
void GWB_Option_SetDefaultValue (GWB_OPTION *option, const char *s)
 
void GWB_Option_SetDefinePrefix (GWB_OPTION *option, const char *s)
 
void GWB_Option_SetOptionType (GWB_OPTION *option, int i)
 
int GWB_OptionType_fromString (const char *s)
 
const char * GWB_OptionType_toString (int t)
 

Typedef Documentation

◆ GWB_OPTION

typedef struct GWB_OPTION GWB_OPTION

Definition at line 17 of file option.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
GWB_OptionType_Unknown 
GWB_OptionType_None 
GWB_OptionType_String 
GWB_OptionType_StringList 

Definition at line 21 of file option.h.

Function Documentation

◆ GWB_Option_AddAlias()

void GWB_Option_AddAlias ( GWB_OPTION option,
const char *  name,
const char *  value 
)

Definition at line 106 of file option.c.

References GWB_KeyValuePair_new().

Referenced by GWB_ParseOption().

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

◆ GWB_Option_AddChoice()

void GWB_Option_AddChoice ( GWB_OPTION option,
const char *  s 
)

Definition at line 149 of file option.c.

References GWEN_StringList_AppendString().

Here is the call graph for this function:

◆ GWB_Option_Dump()

void GWB_Option_Dump ( const GWB_OPTION option,
int  indent 
)

Definition at line 172 of file option.c.

References GWBUILD_Debug_PrintKvpList(), GWBUILD_Debug_PrintStringList(), and GWBUILD_Debug_PrintValue().

Referenced by GWBUILD_Debug_PrintOptionList().

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

◆ GWB_Option_free()

void GWB_Option_free ( GWB_OPTION option)

Definition at line 46 of file option.c.

References GWEN_FREE_OBJECT, GWEN_LIST_FINI, and GWEN_StringList_free().

Here is the call graph for this function:

◆ GWB_Option_GetAlias()

const char * GWB_Option_GetAlias ( const GWB_OPTION option,
const char *  name 
)

Definition at line 116 of file option.c.

References GWB_KeyValuePair_List_GetValue().

Referenced by _checkStringListOption(), and _checkStringOption().

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

◆ GWB_Option_GetAliasList()

GWB_KEYVALUEPAIR_LIST * GWB_Option_GetAliasList ( const GWB_OPTION option)

Definition at line 99 of file option.c.

◆ GWB_Option_GetChoiceList()

GWEN_STRINGLIST * GWB_Option_GetChoiceList ( const GWB_OPTION option)

Definition at line 123 of file option.c.

Referenced by GWB_ParseOption().

Here is the caller graph for this function:

◆ GWB_Option_GetDefaultValue()

const char * GWB_Option_GetDefaultValue ( const GWB_OPTION option)

Definition at line 84 of file option.c.

Referenced by _checkAgainstGivenOption().

Here is the caller graph for this function:

◆ GWB_Option_GetDefinePrefix()

const char * GWB_Option_GetDefinePrefix ( const GWB_OPTION option)

Definition at line 156 of file option.c.

Referenced by _checkStringListOption().

Here is the caller graph for this function:

◆ GWB_Option_GetId()

const char * GWB_Option_GetId ( const GWB_OPTION option)

Definition at line 63 of file option.c.

Referenced by _checkAgainstGivenOption(), _checkStringListOption(), _checkStringOption(), and GWB_Project_GetOptionById().

Here is the caller graph for this function:

◆ GWB_Option_GetOptionType()

int GWB_Option_GetOptionType ( const GWB_OPTION option)

Definition at line 70 of file option.c.

Referenced by _checkAgainstGivenOption().

Here is the caller graph for this function:

◆ GWB_Option_HasChoices()

int GWB_Option_HasChoices ( const GWB_OPTION option)

Definition at line 130 of file option.c.

References GWEN_StringList_Count().

Here is the call graph for this function:

◆ GWB_Option_IsValidChoice()

int GWB_Option_IsValidChoice ( const GWB_OPTION option,
const char *  s 
)

Definition at line 137 of file option.c.

References GWEN_StringList_Count(), and GWEN_StringList_HasString().

Referenced by _checkStringListOption(), and _checkStringOption().

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

◆ GWB_Option_new()

GWB_OPTION * GWB_Option_new ( const char *  id)

Definition at line 30 of file option.c.

References GWEN_LIST_INIT, GWEN_NEW_OBJECT, GWEN_StringList_new(), and NULL.

Referenced by GWB_ParseOption().

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

◆ GWB_Option_SetDefaultValue()

void GWB_Option_SetDefaultValue ( GWB_OPTION option,
const char *  s 
)

Definition at line 91 of file option.c.

References NULL.

Referenced by GWB_ParseOption().

Here is the caller graph for this function:

◆ GWB_Option_SetDefinePrefix()

void GWB_Option_SetDefinePrefix ( GWB_OPTION option,
const char *  s 
)

Definition at line 163 of file option.c.

References NULL.

Referenced by GWB_ParseOption().

Here is the caller graph for this function:

◆ GWB_Option_SetOptionType()

void GWB_Option_SetOptionType ( GWB_OPTION option,
int  i 
)

Definition at line 77 of file option.c.

Referenced by GWB_ParseOption().

Here is the caller graph for this function:

◆ GWB_OptionType_fromString()

int GWB_OptionType_fromString ( const char *  s)

Definition at line 205 of file option.c.

References GWB_OptionType_None, GWB_OptionType_String, GWB_OptionType_StringList, and GWB_OptionType_Unknown.

Referenced by GWB_ParseOption().

Here is the caller graph for this function:

◆ GWB_OptionType_toString()

const char * GWB_OptionType_toString ( int  t)