xml-utils.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef GCU_XML_UTILS_H
00027 #define GCU_XML_UTILS_H
00028
00029 #include <libxml/parser.h>
00030 #include "chemistry.h"
00031 #include <goffice/goffice.h>
00032
00048 xmlNodePtr FindNodeByNameAndId (xmlNodePtr node, const char* name, const char* id = NULL);
00049
00063 bool ReadPosition (xmlNodePtr node, const char* id, double* x, double* y, double* z = NULL);
00077 bool WritePosition (xmlDocPtr xml, xmlNodePtr node, const char* id, double x, double y, double z = 0.0);
00078
00092 bool ReadColor (xmlNodePtr node, const char* id, float* red, float* green, float* blue, float* alpha = NULL);
00107 bool WriteColor (xmlDocPtr xml, xmlNodePtr node, const char* id, double red, double green, double blue, double alpha = 1.0);
00108
00115 GOColor ReadColor (xmlNodePtr node);
00116
00122 void WriteColor (xmlNodePtr node, GOColor color);
00123
00133 bool ReadRadius (xmlNodePtr node, GcuAtomicRadius& radius);
00134
00144 bool WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius& radius);
00145
00155 char const *GetStaticScale (char *buf);
00156
00157 #endif // GCU_XML_UTILS_H