Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

xml-utils.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /* 
00004  * Gnome Chemistry Utils
00005  * xml-utils.h
00006  *
00007  * Copyright (C) 2002-2004
00008  *
00009  * Developed by Jean Bréfort <jean.brefort@normalesup.org>
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2.1 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this library; if not, write to the 
00023  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00024  * Boston, MA  02111-1307, USA.
00025  */
00026 
00027 
00028 #ifndef GCU_XML_UTILS_H
00029 #define GCU_XML_UTILS_H
00030 
00031 #include <libxml/parser.h>
00032 #include "chemistry.h"
00033 
00049 xmlNodePtr FindNodeByNameAndId (xmlNodePtr node, const char* name, const char* id = NULL);
00050 
00064 bool ReadPosition (xmlNodePtr node, const char* id, double* x, double* y, double* z = NULL);
00078 bool WritePosition (xmlDocPtr xml, xmlNodePtr node, const char* id, double x, double y, double z = 0.0);
00079 
00093 bool ReadColor (xmlNodePtr node, const char* id, float* red, float* green, float* blue, float* alpha = NULL);
00108 bool WriteColor (xmlDocPtr xml, xmlNodePtr node, const char* id, double red, double green, double blue, double alpha = 1.0);
00109 
00119 bool ReadRadius (xmlNodePtr node, GcuAtomicRadius& radius);
00129 bool WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius& radius);
00130 #endif  // GCU_XML_UTILS_H

Generated on Fri Jun 17 11:47:12 2005 for The Gnome Chemistry Utils by  doxygen 1.4.1