Go to the source code of this file.
Functions | |
xmlNodePtr | FindNodeByNameAndId (xmlNodePtr node, const char *name, const char *id=NULL) |
bool | ReadPosition (xmlNodePtr node, const char *id, double *x, double *y, double *z=NULL) |
bool | WritePosition (xmlDocPtr xml, xmlNodePtr node, const char *id, double x, double y, double z=0.0) |
bool | ReadColor (xmlNodePtr node, const char *id, float *red, float *green, float *blue, float *alpha=NULL) |
bool | WriteColor (xmlDocPtr xml, xmlNodePtr node, const char *id, double red, double green, double blue, double alpha=1.0) |
bool | ReadRadius (xmlNodePtr node, GcuAtomicRadius &radius) |
bool | WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius &radius) |
Definition in file xml-utils.h.
xmlNodePtr FindNodeByNameAndId | ( | xmlNodePtr | node, | |
const char * | name, | |||
const char * | id = NULL | |||
) |
ReadPosition
node,: | a pointer to the current parsed XML Node. | |
name,: | the name of the searched node. | |
id,: | the id property of the node or NULL if not significant. This parameter might be omitted in the last case. |
bool ReadColor | ( | xmlNodePtr | node, | |
const char * | id, | |||
float * | red, | |||
float * | green, | |||
float * | blue, | |||
float * | alpha = NULL | |||
) |
node,: | a pointer to the xmlNode representing an Object instance. | |
id,: | the value of the id property of the color. This is used for Object instances having at least two colors. | |
red,: | a pointer to the red component of the color. | |
green,: | a pointer to the green component of the color. | |
blue,: | a pointer to the blue component of the color. | |
alpha,: | a pointer to the alpha component of the color or NULL if tranparency is not managed. |
bool ReadPosition | ( | xmlNodePtr | node, | |
const char * | id, | |||
double * | x, | |||
double * | y, | |||
double * | z = NULL | |||
) |
node,: | a pointer to the xmlNode representing an Object instance. | |
id,: | the value of the id property of the position. This is used for example for arrows because both the head and the tail of the arrow are positions. | |
x,: | a pointer to the x coordinate of the position. | |
y,: | a pointer to the y coordinate of the position. | |
z,: | a pointer to the z coordinate of the position or NULL for 2D objects. |
bool ReadRadius | ( | xmlNodePtr | node, | |
GcuAtomicRadius & | radius | |||
) |
node,: | a pointer to the xmlNode representing an Object instance. | |
radius,: | a GcuAtomicRadius structure. |
bool WriteColor | ( | xmlDocPtr | xml, | |
xmlNodePtr | node, | |||
const char * | id, | |||
double | red, | |||
double | green, | |||
double | blue, | |||
double | alpha = 1.0 | |||
) |
xml,: | a pointer to the xmlDoc used to serialize the document. | |
node,: | a pointer to the xmlNode representing an Object instance. | |
id,: | the value of the id property of the color. This is used for Object instances having at least two colors. of the arrow are positions. | |
red,: | the red component of the color. | |
green,: | the green component of the color. | |
blue,: | the blue component of the color. | |
alpha,: | the alpha component of the color. |
bool WritePosition | ( | xmlDocPtr | xml, | |
xmlNodePtr | node, | |||
const char * | id, | |||
double | x, | |||
double | y, | |||
double | z = 0.0 | |||
) |
WritePosition
xml,: | a pointer to the xmlDoc used to serialize the document. | |
node,: | a pointer to the xmlNode representing an Object instance. | |
id,: | the value of the id property of the position. This is used for example for arrows because both the head and the tail of the arrow are positions. | |
x,: | the x coordinate of the position. | |
y,: | the y coordinate of the position. | |
z,: | the z coordinate of the position. |
bool WriteRadius | ( | xmlDocPtr | xml, | |
xmlNodePtr | node, | |||
const GcuAtomicRadius & | radius | |||
) |
xml,: | a pointer to the xmlDoc used to serialize the document. | |
node,: | a pointer to the xmlNode representing an Object instance. | |
radius,: | a GcuAtomicRadius structure. |