|
gwenhywfar 5.14.1
|
Go to the source code of this file.
| GWENHYWFAR_API double GWEN_Param_GetCurrentValueAsDouble | ( | const GWEN_PARAM * | param | ) |
Returns the current value of the given param converted to floating point.
| param | parameter to read the value from |
References GWENHYWFAR_API.
| GWENHYWFAR_API int GWEN_Param_GetCurrentValueAsInt | ( | const GWEN_PARAM * | param | ) |
Returns the current value of the given param converted to integer.
| param | parameter to read the value from |
References GWENHYWFAR_API.
| GWENHYWFAR_API double GWEN_Param_List_GetCurrentValueAsDouble | ( | const GWEN_PARAM_LIST * | pl, |
| const char * | name, | ||
| double | defVal ) |
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.
| pl | list of parameters |
| name | name of the parameter |
| defVal | default value (returned if param has no value or no valid value). |
References GWENHYWFAR_API.
| GWENHYWFAR_API int GWEN_Param_List_GetCurrentValueAsInt | ( | const GWEN_PARAM_LIST * | pl, |
| const char * | name, | ||
| int | defVal ) |
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.
| pl | list of parameters |
| name | name of the parameter |
| defVal | default value (returned if param has no value or no valid value). |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_List_ReadValuesFromXml | ( | GWEN_PARAM_LIST * | pl, |
| GWEN_XMLNODE * | xn ) |
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.
| pl | list of parameters to read values for |
| xn | XML node to read values for the parameters |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_List_ReadXml | ( | GWEN_PARAM_LIST * | pl, |
| GWEN_XMLNODE * | xn ) |
Read a list of parameters from XML.
| pl | list to store parameters read |
| xn | XML node to read the parameters from |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_List_SetCurrentValueAsDouble | ( | GWEN_PARAM_LIST * | pl, |
| const char * | name, | ||
| double | v ) |
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.
| pl | list of parameters |
| name | name of the parameter |
| v | value to set. |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_List_SetCurrentValueAsInt | ( | GWEN_PARAM_LIST * | pl, |
| const char * | name, | ||
| int | v ) |
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.
| pl | list of parameters |
| name | name of the parameter |
| v | value to set. |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_List_WriteValuesToXml | ( | const GWEN_PARAM_LIST * | pl, |
| GWEN_XMLNODE * | xn ) |
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:
| pl | list of parameters to write |
| xn | XML node to store the parameters |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_List_WriteXml | ( | const GWEN_PARAM_LIST * | pl, |
| GWEN_XMLNODE * | xn ) |
Write the list of parameters to XML.
| pl | list of parameters to write |
| xn | XML node to store the parameters |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_SetCurrentValueAsDouble | ( | GWEN_PARAM * | param, |
| double | v ) |
Changes the current value of the given param (converted from floating point). The given value is converted to char and stored.
| param | parameter to change |
| v | value to set |
References GWENHYWFAR_API.
| GWENHYWFAR_API void GWEN_Param_SetCurrentValueAsInt | ( | GWEN_PARAM * | param, |
| int | v ) |
Changes the current value of the given param (converted from integer). The given value is converted to char and stored.
| param | parameter to change |
| v | value to set |
References GWENHYWFAR_API.