The Time_Object parameter are stored in a Time_Parm instance:
#CLASS Time_Parm : Root { /* PRIVATE */ BOUNDED_RULER **int_rul; /* Ruler for integer parameter, not time dependent */ FUNCTION_RULER **dbl_rul; /* Function ruler for double parameter */ /* USER */ int num_int_parm; /* Number of integer parameter */ int num_double_parm; /* Number of double parameter */ int *int_parm; /* Pointer to memory for integer parameter */ double *double_parm; /* Pointer to memory for double parameter */ };
Each int/double parameter corresponds to a Ruler/Function_Ruler which allows to edit its value. The double variables are time-dependent, the Splines of the associated Function_Rulers describe their values as functions over the time, see 4.1.2.6.
There are only a few methods on Time_Parm for memory management, debugging, for (de)activating the rulers and for archiving the int and double values:
The rulers itself are not created by "list-alloc", this is usually done by the function g_time_parm_get_data (see below) which is called when a description file is read. "list-free" removes the rulers and deletes them before freeing the arrays.
The rulers are currently not handled by this method, therefore the double variables will lose their time-dependency.
There are some utility function which help reading and handling the Time_Parm variables:
reads in the number of int and double parameter and their initial values (see 8.2.1.3 for an example file), creates the corresponding rulers and adds them to the manager.int g_time_parm_get_data(FILE *fp, TIME_PARM *tparm, char *name, char *path, double *time)
simplifies parsing formulas which use the tparm variables. After calling this function the string varlist contains a list of the variable names separated by spaces (see 8.2.2.1 for naming conventions), it starts with "t" for the time followed by the int parameter "i ..." and the double parameter "a ...".int g_time_parm_get_var_list(TIME_PARM *tparm, char *varlist)
helps evaluating functions. It stores the tparm variable values for the current time in the values array: values[] = {time, (double)int_parm[0], ..., (double)int_parm[num_int_parm - 1], double_parm[0], ..., double_parm[num_double_parm - 1] }.void g_time_parm_get_var_values(TIME_PARM *tparm, double time, double *values)
Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.