Internal (not exported) helper functions, not part of the API. More...

Functions | |
| static char * | getFullName (const char *sectionName, const char *paramName) |
| Helper function to get the full name of a parameter (full name: "sectionName/paramName"). | |
| static struct param * | getParamByName (struct parmHeader *conf, const char *sectionName, const char *paramName, int flag) |
| Helper function to get (or create) a parameter by name. | |
| static void | removeParamByName (struct parmHeader *conf, const char *sectionName, const char *paramName) |
| Helper function to remove a parameter with given name paramName. | |
| static void | cleanUnusedSection (struct parmHeader *conf, struct section *section) |
| Helper function to clean up unused (empty) sections starting with given section. | |
| static void | removeParam (struct parmHeader *conf, struct section *section, struct param *param) |
| Helper function to remove given parameter. | |
| static struct param * | addParam (struct parmHeader *conf, struct section *section, const char *paramName, const char *value) |
| Helper function to add parameter, does not check for duplicated name. | |
| static void | removeSection (struct parmHeader *conf, struct section *section) |
| Helper function to remove a section and its contents (subsections, elements). | |
| static struct section * | getParent (struct parmHeader *conf, const char *sectionName) |
| Helper function to get (or create if not found) parent section of section given in sectionName. | |
| static struct section * | addSection (struct parmHeader *conf, const char *sectionName) |
| Helper function to add a section to a parameter set. | |
| static struct parmHeader * | getSharedHeader (const char *file, int mode) |
| Helper function for looking up parameter sets in the cache. | |
| static struct parmHeader * | createParmHeader (const char *file) |
| Helper function to create header for parameter set handle. | |
| static void | addWithin (struct param *curParam, char *s1) |
| Helper function to add "within" options to parameter curParam. | |
| static tdble | getValNumFromStr (const char *str) |
| Helper function to parse number. | |
| static void | xmlStartElement (void *userData, const char *name, const char **atts) |
| Helper function to process opening XML elements. | |
| static void | xmlEndElement (void *userData, const XML_Char *name) |
| Helper function to process closing XML elements. | |
| static int | xmlExternalEntityRefHandler (XML_Parser mainparser, const XML_Char *openEntityNames, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) |
| Helper function to handle external XML entities (XML referencing over multiple files/URI's). | |
| static int | parseXml (struct parmHandle *parmHandle, char *buf, int len, int done) |
| Helper function to parse one line of XML. | |
| static int | parserXmlInit (struct parmHandle *parmHandle) |
| Helper function to set up XML parser in parmHandle. | |
| static int | formatXmlBuffer (char *buf, const int size, const char *format,...) |
| Helper function to format text without truncating the output. | |
| static int | handleEntities (char *buf, const int BUFSIZE, const char *val) |
| Helper function to convert the input line given in val into proper XML notation, the output goes into buf. | |
| static int | createIndent (char *buf, const int BUFSIZE, const int blanks) |
| Helper function for indentation in the XML. | |
| static int | createIn (char *buf, const int BUFSIZE, withinHead *head) |
| Helper function to support the serialization into the XML of the "within" attribute. | |
| static int | xmlGetOuputLine (struct parmHandle *parmHandle, char *buffer, int size) |
| Helper function to output one line of XML generated from the given parameter set. | |
| static void | parmClean (struct parmHeader *conf) |
| Helper function to release the parameter set content. | |
| static void | parmReleaseHeader (struct parmHeader *conf) |
| Helper function to release the parameter set if the reference counter is 0. | |
| static void | parmReleaseHandle (struct parmHandle *parmHandle) |
| Helper function to release the handle and eventually the referenced parameter set (if the reference counter falls to 0). | |
| static void | evalUnit (char *unit, tdble *dest, int flg) |
| Support function to multiply or divide dest with unit conversion factor. | |
| static void | insertParamMerge (struct parmHandle *parmHandle, char *path, struct param *paramRef, struct param *param) |
| Helper function to merge a parameter into a parameter set. | |
| static void | insertParam (struct parmHandle *parmHandle, char *path, struct param *param) |
| Helper function to insert a parameter into a parameter set. | |
Internal (not exported) helper functions, not part of the API.
|
static |
Helper function to add parameter, does not check for duplicated name.
| [in,out] | conf | parameter set header |
| [in,out] | section | section to add parameter to |
| [in] | paramName | parameter name |
| [in] | value | value of parameter |
Definition at line 351 of file params.cpp.

|
static |
Helper function to add a section to a parameter set.
| [in,out] | conf | parameter set header |
| [in] | sectionName | section name |
Definition at line 486 of file params.cpp.

|
static |
Helper function to add "within" options to parameter curParam.
| [in] | curParam | parameter to add "within" option |
| [in] | s1 | option string |
Definition at line 653 of file params.cpp.
|
static |
Helper function to clean up unused (empty) sections starting with given section.
| [in,out] | conf | parameter set header |
| [in] | section | section to start up cleaning |
Definition at line 296 of file params.cpp.

|
static |
Helper function to support the serialization into the XML of the "within" attribute.
| [in,out] | buf | buffer for the result |
| [in] | BUFSIZE | buffer size |
| [in] | head | head of the list with the within options |
Definition at line 1398 of file params.cpp.
|
static |
Helper function for indentation in the XML.
| [in,out] | buf | buffer for the result |
| [in] | BUFSIZE | buffer size |
| [in] | blanks | number of blanks to write |
Definition at line 1368 of file params.cpp.
|
static |
Helper function to create header for parameter set handle.
| [in] | file | filename |
Definition at line 587 of file params.cpp.

|
static |
Support function to multiply or divide dest with unit conversion factor.
This function is used by GfParmUnit2SI and GfParmSI2Unit. The given unit string gets split up and processed unit by unit with evalUnit.
| [in] | unit | unit name from dest |
| [in,out] | dest | pointer to value to convert |
| flg | multiply (0) or divide (otherwise) |
Definition at line 1988 of file params.cpp.
|
static |
Helper function to format text without truncating the output.
| [in,out] | buf | buffer for the formatted output |
| [in] | size | buffer size |
| [in] | format | printf-style format string |
Definition at line 1274 of file params.cpp.
|
static |
Helper function to get the full name of a parameter (full name: "sectionName/paramName").
| [in] | sectionName | name of the section containing the parameter |
| [in] | paramName | name of the parameter |
Definition at line 192 of file params.cpp.
|
static |
Helper function to get (or create) a parameter by name.
| [in,out] | conf | parameter set header |
| [in] | sectionName | name of the section containing the parameter |
| [in] | paramName | name of the parameter |
| [in] | flag | if in flag the PARAM_CREATE bit is set the parameter gets created if it is not found |
Definition at line 218 of file params.cpp.

|
static |
Helper function to get (or create if not found) parent section of section given in sectionName.
| [in] | conf | parameter set header |
| [in] | sectionName | name of the section |
Definition at line 446 of file params.cpp.

|
static |
Helper function for looking up parameter sets in the cache.
| file | name of the file to look up |
| mode | opening mode is a mask of: GFPARM_RMODE_STD if the parameter set is already loaded and not private return a handle pointing to the existing parameter set (default) GFPARM_RMODE_REREAD re-read the parameters file GFPARM_RMODE_CREAT if the parameters file does not exist return a handle pointing to an empty parameter set (does not create a file on disk, this is done using GfParmWriteFile). GFPARM_RMODE_PRIVATE mark handle as private |
Definition at line 551 of file params.cpp.

|
static |
Helper function to parse number.
| [in] | str | number as string |
Definition at line 679 of file params.cpp.
|
static |
Helper function to convert the input line given in val into proper XML notation, the output goes into buf.
| [in,out] | buf | buffer for the processed line |
| [in] | BUFSIZE | buffer size |
| [in] | val | input line |
Definition at line 1307 of file params.cpp.
|
static |
Helper function to insert a parameter into a parameter set.
If the parameter param already exists in paramHandle, the values are overwritten with the values from param. If the parameter param does not yet exist in paramHandle, it gets created.
| [in,out] | parmHandle | parameter set handle |
| [in] | path | path to the parameter |
| [in] | param | parameter |
Definition at line 3063 of file params.cpp.

|
static |
Helper function to merge a parameter into a parameter set.
If the parameter param already exists in paramHandle, the values are overwritten with the values from param. If the parameter param does not yet exist in paramHandle, it gets created. The value and restrictions (min, max, within) in param are checked against the restrictions given by parmRef and adjusted if required.
| [in,out] | parmHandle | parameter set handle |
| [in] | path | path to the parameter |
| [in] | paramRef | reference parameter for min/max boundaries or string set restrictions |
| [in] | param | parameter |
Definition at line 2971 of file params.cpp.

|
static |
Helper function to release the parameter set content.
| [in] | conf | parameter set header |
Definition at line 1850 of file params.cpp.

|
static |
Helper function to release the handle and eventually the referenced parameter set (if the reference counter falls to 0).
| [in] | parmHandle | parameter set handle |
Definition at line 1931 of file params.cpp.

|
static |
Helper function to release the parameter set if the reference counter is 0.
| [in] | conf | parameter set header |
Definition at line 1894 of file params.cpp.

|
static |
Helper function to set up XML parser in parmHandle.
| [in] | parmHandle | parameter set handle |
Definition at line 1077 of file params.cpp.

|
static |
Helper function to parse one line of XML.
| [in,out] | parmHandle | parameter set handle |
| [in] | buf | line to parse |
| [in] | len | buffer size |
| [in] | done | this was the last slice, no more input available |
Definition at line 1054 of file params.cpp.

|
static |
Helper function to remove given parameter.
| [in,out] | conf | parameter set header |
| [in,out] | section | section to remove parameter from |
| [in] | param | parameter to remove |
Definition at line 321 of file params.cpp.

|
static |
Helper function to remove a parameter with given name paramName.
| [in,out] | conf | parameter set header |
| [in] | sectionName | name of the section containing the parameter |
| [in] | paramName | name of the parameter |
Definition at line 259 of file params.cpp.

|
static |
Helper function to remove a section and its contents (subsections, elements).
| [in,out] | conf | parameter set header |
| [in] | section | section to remove |
Definition at line 416 of file params.cpp.

|
static |
Helper function to process closing XML elements.
| [in,out] | userData | handle to parameter set to read data into |
| [in] | name | name of the current XML element |
Definition at line 948 of file params.cpp.
|
static |
Helper function to handle external XML entities (XML referencing over multiple files/URI's).
| [in] | mainparser | parent XML parser |
| [in] | openEntityNames | space separated list of names of entities that are open for the parse of this entity |
| [in] | base | unused (base path for resolving system id) |
| [in] | systemId | path to external entity (SYSTEM in XML) |
| [in] | publicId | unused (public identifier of external entity, PUBLIC in XML) |
Definition at line 978 of file params.cpp.

|
static |
Helper function to output one line of XML generated from the given parameter set.
The parameter set handle parmHandle keeps track of the progress internally.
| [in,out] | parmHandle | parameter set handle |
| [in,out] | buffer | buffer for the line |
| [in] | size | buffer size |
Definition at line 1456 of file params.cpp.

|
static |
Helper function to process opening XML elements.
| [in,out] | userData | handle to parameter set to read data into |
| [in] | name | name of the current XML element |
| [in] | atts | attributes of the XML element |
Definition at line 703 of file params.cpp.
