torcs - 1.2.2

Parameters List manipulation.
[Parameters file management.]


Detailed Description

Read, write, merge parameters files.


Functions

int GfParmGetEltNb (void *handle, char *path)
 Count the number of section elements of a list.

int GfParmListSeekFirst (void *handle, char *path)
 Seek the first section element of a list.

int GfParmListSeekNext (void *handle, char *path)
 Go to the next section element in the current list.

int GfParmListClean (void *handle, char *path)
 Remove all the section elements of a list.

char * GfParmListGetCurEltName (void *handle, char *path)
 Get The current element name.

char * GfParmGetCurStr (void *handle, char *path, char *key, char *deflt)
 Get a string parameter in a config file.

tdble GfParmGetCurNum (void *handle, char *path, char *key, char *unit, tdble deflt)
 Get a numerical parameter in a config file.

int GfParmSetCurStr (void *handle, char *path, char *key, char *val)
 Set a string parameter in a config file.

int GfParmSetCurNum (void *handle, char *path, char *key, char *unit, tdble val)
 Set a numerical parameter in a config file.


Function Documentation

tdble GfParmGetCurNum void *  handle,
char *  path,
char *  key,
char *  unit,
tdble  deflt
 

Get a numerical parameter in a config file.

Parameters:
handle handle of parameters
path path of param
key key name
unit unit to convert the result to (NULL if SI wanted)
deflt default string
Returns:
parameter value

Here is the call graph for this function:

char* GfParmGetCurStr void *  handle,
char *  path,
char *  key,
char *  deflt
 

Get a string parameter in a config file.

Parameters:
handle handle of parameters
path path of param
key key name
deflt default string
Returns:
parameter value
Warning:
the return value is allocated by the function the caller must free it.
See also:
GfParmListSeekNext

Here is the call graph for this function:

int GfParmGetEltNb void *  handle,
char *  path
 

Count the number of section elements of a list.

Parameters:
handle handle of parameters
path path of list
Returns:
element count

Here is the call graph for this function:

int GfParmListClean void *  handle,
char *  path
 

Remove all the section elements of a list.

Parameters:
handle handle of parameters
path path of list
Returns:
0 Ok
-1 Error

Here is the call graph for this function:

char* GfParmListGetCurEltName void *  handle,
char *  path
 

Get The current element name.

Parameters:
handle handle of parameters
path path of list
Returns:
Name of the current element in the list
NULL if failed
See also:
GfParmListSeekFirst

GfParmListSeekNext

Note:
String MUST be released by called.

Here is the call graph for this function:

int GfParmListSeekFirst void *  handle,
char *  path
 

Seek the first section element of a list.

Parameters:
handle handle of parameters
path list path
Returns:
0 Ok
-1 Failed
See also:
GfParmListSeekNext

GfParmListGetCurEltName

Here is the call graph for this function:

int GfParmListSeekNext void *  handle,
char *  path
 

Go to the next section element in the current list.

Parameters:
handle handle of parameters
path path of list
Returns:
0 Ok
1 End of list reached
-1 Failed
See also:
GfParmListSeekFirst

GfParmListGetCurEltName

Here is the call graph for this function:

int GfParmSetCurNum void *  handle,
char *  path,
char *  key,
char *  unit,
tdble  val
 

Set a numerical parameter in a config file.

Parameters:
handle handle of parameters
path path of param
key key name
unit unit to convert the result to (NULL if SI wanted)
val value to set
Returns:
0 ok
-1 error
Warning:
The key is created is necessary

Here is the call graph for this function:

int GfParmSetCurStr void *  handle,
char *  path,
char *  key,
char *  val
 

Set a string parameter in a config file.

Parameters:
handle handle of parameters
path path of param
key key name
val value
Returns:
0 ok
-1 error
Warning:
The key is created is necessary

Here is the call graph for this function:


Generated at Thu Feb 26 21:54:22 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.