yanera_xml_util.h File Reference


Detailed Description

This file contains linked-list and memory utility functions, utilized only by the XML related functions.

Definition in file yanera_xml_util.h.

Go to the source code of this file.

Functions

void linkComponentIntoContainer (yanera_layer *layer, yanera_container *yanera)
 Links a yanera_layer into the component list.
short newParameter (double d, short i, yanera_container *yanera)
 Adds a paramter to the yanera_parameters.
short newFuncParameter (char c, double d, unsigned short i, yanera_layer *layer, yanera_container *yanera)
 Adds a variable to the array for a function type layer.
unsigned short getYesNoBooleanFromString (char *buf)
 Determines the fix flag from a parameter XML property.
void setYesNoBooleanFromString (char *buf, short i1)
 Set the buffer for the 'fix' XML property.
yanera_layernewLayer (short type)
 Allocates a new yanera_layer.
yanera_layercopyLayer (yanera_layer *source)
 Makes a copy of a yanera_layer.
void linkLayerIntoModel (yanera_layer *layer, yanera_model *model)
 Links a yanera_layer into a yanera_model.
void xmlErrorFunc (void *ctx, xmlErrorPtr error)
 Function to catch the strucutred errors of XML parsing.


Function Documentation

void linkComponentIntoContainer ( yanera_layer layer,
yanera_container yanera 
)

Parameters:
layer The layer to be linked.
yanera The yanera_container to link the layer into.
Takes a yanera_layer and links it to the end of the list of yanera_components found in the yanera_container.

Definition at line 25 of file yanera_xml_util.c.

short newParameter ( double  d,
short  i,
yanera_container yanera 
)

Parameters:
d The numerical value of the paramter.
i The fix boolean for the paramter.
yanera The yanera_container to add the parameter to.
Returns:
The index of the yanera_parameters.p array of the newly added paramter.

Definition at line 51 of file yanera_xml_util.c.

short newFuncParameter ( char  c,
double  d,
unsigned short  i,
yanera_layer layer,
yanera_container yanera 
)

Parameters:
c The variable character of the paramter.
d The numerical value of the paramter.
i The fix boolean for the paramter.
layer The yanera_layer that is of function type.
yanera The yanera_container to add the parameter to.

Definition at line 87 of file yanera_xml_util.c.

unsigned short getYesNoBooleanFromString ( char *  buf  ) 

Parameters:
[in] buf The buffer containing the property of a layer paramter.
Returns:
A boolean yes or no.
this is a convienience function for repeated use.

Definition at line 107 of file yanera_xml_util.c.

void setYesNoBooleanFromString ( char *  buf,
short  i1 
)

Parameters:
[in] buf The buffer to hold the property of a layer paramter.
[in] i1 The boolean flag.
IMPORTANT: The buffer memory must be prealocated and of at least size 4.

Definition at line 128 of file yanera_xml_util.c.

yanera_layer* newLayer ( short  type  ) 

Returns:
A newly allocated yanera_layer

Definition at line 135 of file yanera_xml_util.c.

yanera_layer* copyLayer ( yanera_layer source  ) 

Returns:
A newly allocated yanera_layer.

Definition at line 177 of file yanera_xml_util.c.

void linkLayerIntoModel ( yanera_layer layer,
yanera_model model 
)

Parameters:
layer The yanera_layer to link.
model The yanera_model with the linked list of yanera_model.

Definition at line 279 of file yanera_xml_util.c.

void xmlErrorFunc ( void *  ctx,
xmlErrorPtr  error 
)

Parameters:
ctx Not sure what this should be, treating as xmlValidCtxt
error The xmlError structure, containing error message and location.

Definition at line 303 of file yanera_xml_util.c.


Generated on Thu May 29 10:56:33 2008 by  doxygen 1.5.5