yanera_container
allocated in the main loop of the program is passed down through the function calls. Every function thus has access to all the stored information; but mostly it is to allow access to the information in _misc
and _parameters
.
The data model followed here is closely related to the document model of the XML input, that is to say, the first model is a complete description of that model, and additional models only show modifications to that base model. Thus, the XML file is read into models_xml
just as they appear in the XML file. Then models_complete
is contructed from the models_xml
.
component
.
Access to paramters is simple, for example, to retrieve the real SLD from a layer with either layer_id
"L" or name
"NAME" from within a certain model with data_idref
"M", one can try the psuedocode here
yanera_container *y; yanera_layer *l;
for i=0 to y->number_of_models-1 { if (y->model[i].idref == "M") break; }
l
now points to desired layer in desired model, and the value of a parameter, rsld
for example, can be easily obtained: y->parameters.p[l->rsld]
Definition at line 568 of file yanera.h.
Data Fields | |
enum model_type | type |
double(* | parrattFunction )(double, yanera_model *, struct _yanera *) |
double(* | profileFunctionReal )(double, yanera_model *, struct _yanera *) |
double(* | profileFunctionImag )(double, yanera_model *, struct _yanera *) |
yanera_model | models_xml [10] |
yanera_model | models_complete [10] |
yanera_data | data [10] |
unsigned short | number_of_models |
unsigned short | number_of_data |
unsigned short | idx |
yanera_parameters | parameters |
yanera_layer * | components |
yanera_misc | misc |
char * | filename |
enum model_type _yanera::type |
double(* _yanera::parrattFunction)(double, yanera_model *, struct _yanera *) |
PLEASE FILL IN
double(* _yanera::profileFunctionReal)(double, yanera_model *, struct _yanera *) |
PLEASE FILL IN
double(* _yanera::profileFunctionImag)(double, yanera_model *, struct _yanera *) |
PLEASE FILL IN
unsigned short _yanera::number_of_models |
unsigned short _yanera::number_of_data |
unsigned short _yanera::idx |
See _parameters
char* _yanera::filename |