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"). More... | |
| 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. More... | |
| static void | removeParamByName (struct parmHeader *conf, const char *sectionName, const char *paramName) |
| Helper function to remove a parameter with given name paramName. More... | |
| static void | cleanUnusedSection (struct parmHeader *conf, struct section *section) |
| Helper function to clean up unused (empty) sections starting with given section. More... | |
| static void | removeParam (struct parmHeader *conf, struct section *section, struct param *param) |
| Helper function to remove given parameter. More... | |
| 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. More... | |
| static void | removeSection (struct parmHeader *conf, struct section *section) |
| Helper function to remove a section and its contents (subsections, elements). More... | |
| 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. More... | |
| static struct section * | addSection (struct parmHeader *conf, const char *sectionName) |
| Helper function to add a section to a parameter set. More... | |
| static struct parmHeader * | getSharedHeader (const char *file, int mode) |
| Helper function for looking up parameter sets in the cache. More... | |
| static struct parmHeader * | createParmHeader (const char *file) |
| Helper function to create header for parameter set handle. More... | |
| static void | addWithin (struct param *curParam, char *s1) |
| Helper function to add "within" options to parameter curParam. More... | |
| static tdble | getValNumFromStr (const char *str) |
| Helper function to parse number. More... | |
| static void | xmlStartElement (void *userData, const char *name, const char **atts) |
| Helper function to process opening XML elements. More... | |
| static void | xmlEndElement (void *userData, const XML_Char *name) |
| Helper function to process closing XML elements. More... | |
| 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). More... | |
| static int | parseXml (struct parmHandle *parmHandle, char *buf, int len, int done) |
| Helper function to parse one line of XML. More... | |
| static int | parserXmlInit (struct parmHandle *parmHandle) |
| Helper function to set up XML parser in parmHandle. More... | |
| static char * | 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. More... | |
| static void | createIndent (char *buf, const int BUFSIZE, const int blanks) |
| Helper function for indentation in the XML. More... | |
| static void | createIn (char *buf, const int BUFSIZE, withinHead *head) |
| Helper function to support the serialization into the XML of the "within" attribute. More... | |
| static int | xmlGetOuputLine (struct parmHandle *parmHandle, char *buffer, int size) |
| Helper function to output one line of XML generated from the given parameter set. More... | |
| static void | parmClean (struct parmHeader *conf) |
| Helper function to release the parameter set content. More... | |
| static void | parmReleaseHeader (struct parmHeader *conf) |
| Helper function to release the parameter set if the reference counter is 0. More... | |
| 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). More... | |
| static void | evalUnit (char *unit, tdble *dest, int flg) |
| Support function to multiply or divide dest with unit conversion factor. More... | |
| static void | insertParamMerge (struct parmHandle *parmHandle, char *path, struct param *paramRef, struct param *param) |
| Helper function to merge a parameter into a parameter set. More... | |
| static void | insertParam (struct parmHandle *parmHandle, char *path, struct param *param) |
| Helper function to insert a parameter into a parameter set. More... | |
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 346 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 481 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 648 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 291 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 1325 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 1307 of file params.cpp.
|
static |
Helper function to create header for parameter set handle.
| [in] | file | filename |
Definition at line 582 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 1859 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 187 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 213 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 441 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 546 of file params.cpp.

|
static |
Helper function to parse number.
| [in] | str | number as string |
Definition at line 674 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 1254 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 2906 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 2814 of file params.cpp.

|
static |
Helper function to release the parameter set content.
| [in] | conf | parameter set header |
Definition at line 1719 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 1802 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 1765 of file params.cpp.

|
static |
Helper function to set up XML parser in parmHandle.
| [in] | parmHandle | parameter set handle |
Definition at line 1072 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 1049 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 316 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 254 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 411 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 943 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 973 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 1373 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 698 of file params.cpp.
