Go to the source code of this file.
|
GWENHYWFAR_API double | GWEN_Param_GetCurrentValueAsDouble (const GWEN_PARAM *param) |
|
GWENHYWFAR_API int | GWEN_Param_GetCurrentValueAsInt (const GWEN_PARAM *param) |
|
GWENHYWFAR_API double | GWEN_Param_List_GetCurrentValueAsDouble (const GWEN_PARAM_LIST *pl, const char *name, double defVal) |
|
GWENHYWFAR_API int | GWEN_Param_List_GetCurrentValueAsInt (const GWEN_PARAM_LIST *pl, const char *name, int defVal) |
|
GWENHYWFAR_API void | GWEN_Param_List_ReadValuesFromXml (GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) |
|
GWENHYWFAR_API void | GWEN_Param_List_ReadXml (GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) |
|
GWENHYWFAR_API void | GWEN_Param_List_SetCurrentValueAsDouble (GWEN_PARAM_LIST *pl, const char *name, double v) |
|
GWENHYWFAR_API void | GWEN_Param_List_SetCurrentValueAsInt (GWEN_PARAM_LIST *pl, const char *name, int v) |
|
GWENHYWFAR_API void | GWEN_Param_List_WriteValuesToXml (const GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) |
|
GWENHYWFAR_API void | GWEN_Param_List_WriteXml (const GWEN_PARAM_LIST *pl, GWEN_XMLNODE *xn) |
|
GWENHYWFAR_API void | GWEN_Param_SetCurrentValueAsDouble (GWEN_PARAM *param, double v) |
|
GWENHYWFAR_API void | GWEN_Param_SetCurrentValueAsInt (GWEN_PARAM *param, int v) |
|
◆ GWEN_Param_GetCurrentValueAsDouble()
Returns the current value of the given param converted to floating point.
- Returns
- current value as floating point
- Parameters
-
param | parameter to read the value from |
◆ GWEN_Param_GetCurrentValueAsInt()
Returns the current value of the given param converted to integer.
- Returns
- current value as integer
- Parameters
-
param | parameter to read the value from |
◆ GWEN_Param_List_GetCurrentValueAsDouble()
Find param with the given name and return its current value. If there is no value (or no valid value) then a default value is returned. This is for floating point values.
- Returns
- value
- Parameters
-
pl | list of parameters |
name | name of the parameter |
defVal | default value (returned if param has no value or no valid value). |
◆ GWEN_Param_List_GetCurrentValueAsInt()
Find param with the given name and return its current value. If there is no value (or no valid value) then a default value is returned. This is for integer values.
- Returns
- value
- Parameters
-
pl | list of parameters |
name | name of the parameter |
defVal | default value (returned if param has no value or no valid value). |
◆ GWEN_Param_List_ReadValuesFromXml()
Read the current values for a list of parameters from XML.
The XML tree is expected to have been created by GWEN_Param_List_WriteValuesToXml. Every "param" node below the given XML node is expected to have an attribute "name" with the name of the param and a data node which holds the current value to set. Entries for non-existing params are ignored.
- Parameters
-
pl | list of parameters to read values for |
xn | XML node to read values for the parameters |
◆ GWEN_Param_List_ReadXml()
Read a list of parameters from XML.
- Parameters
-
pl | list to store parameters read |
xn | XML node to read the parameters from |
◆ GWEN_Param_List_SetCurrentValueAsDouble()
Find param with the given name and change its current value. If there is no param of that name is found this function does nothing. This is for floating point values.
- Returns
- value
- Parameters
-
pl | list of parameters |
name | name of the parameter |
v | value to set. |
◆ GWEN_Param_List_SetCurrentValueAsInt()
Find param with the given name and change its current value. If there is no param of that name is found this function does nothing. This is for integer values.
- Returns
- value
- Parameters
-
pl | list of parameters |
name | name of the parameter |
v | value to set. |
◆ GWEN_Param_List_WriteValuesToXml()
Write the current values of a list of parameters to XML.
For every member of the given list an XML node "param" is created below the given XML node which only contains the attribute "name" (parameter name) and the param's "currentValue" (the current value) as data node. Example:
<param name="var1">data1</param>
<param name="var2">data2</param>
- Parameters
-
pl | list of parameters to write |
xn | XML node to store the parameters |
◆ GWEN_Param_List_WriteXml()
Write the list of parameters to XML.
- Parameters
-
pl | list of parameters to write |
xn | XML node to store the parameters |
◆ GWEN_Param_SetCurrentValueAsDouble()
Changes the current value of the given param (converted from floating point). The given value is converted to char and stored.
- Parameters
-
param | parameter to change |
v | value to set |
◆ GWEN_Param_SetCurrentValueAsInt()
Changes the current value of the given param (converted from integer). The given value is converted to char and stored.
- Parameters
-
param | parameter to change |
v | value to set |