|
||||
xml.hGo to the documentation of this file.00001 /* 00002 * libx3d io -- XML reader and writer header 00003 * Copyright (C) 2005 Made to Order Software, Corp. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 * 00019 * File: io/include/x3d/xml.h 00020 * License: GNU Lesser General Public License 00022 * $Revision: 1.12 $ 00023 * $Date: 2005/11/29 22:54:15 $ 00024 * 00025 * $Log: xml.h,v $ 00026 * Revision 1.12 2005/11/29 22:54:15 alexis 00027 * Removed the inclusion of node.h since io.h does include it. 00028 * 00029 * Revision 1.11 2005/11/29 05:52:10 alexis 00030 * Mainly documented the entire I/O library. 00031 * Also added the Append(), Update() and Attach() functions. 00032 * 00033 * Revision 1.10 2005/11/28 12:09:02 alexis 00034 * Many changes so I could generate a list of files with their brief comment, 00035 * filename, license, size, number of lines, and last modification date. 00036 * 00037 * Revision 1.9 2005/11/28 03:31:19 alexis 00038 * Added the License: tag 00039 * Fixed many File: tags 00040 * 00041 * Revision 1.8 2005/11/28 01:33:54 alexis 00042 * Fixed the name of the library to libx3dio 00043 * 00044 * Revision 1.7 2005/11/28 01:27:01 alexis 00045 * Fixed the comment about the content of this file 00046 * 00047 * Revision 1.6 2005/11/27 05:01:30 alexis 00048 * Added the version 00049 * 00050 * Revision 1.5 2005/11/26 23:43:00 alexis 00051 * Fixed the const in the Save() function 00052 * 00053 * Revision 1.4 2005/11/26 02:34:41 alexis 00054 * Added the Writer 00055 * 00056 * Revision 1.3 2005/11/25 08:14:37 alexis 00057 * The first compiling version of the libx3dio library. 00058 * 00059 * Revision 1.2 2005/11/25 01:50:48 alexis 00060 * Still working on it... saving current version... 00061 * 00062 * Revision 1.1 2005/11/25 00:39:39 alexis 00063 * The stream handling and XML header 00064 * 00065 * 00066 */ 00067 #ifndef __LIBX3D_XML_H__ 00068 #define __LIBX3D_XML_H__ 00069 00070 #include <x3d/io.h> 00071 00072 #define X3D_XML_VERSION 0.1 00073 00074 #define X3D_XML_RELEASE 0 00075 #define X3D_XML_REVISION 1 00076 00077 00078 /// The XML handling of the X3D libraries 00079 namespace x3dxml 00080 { 00081 00082 00083 00084 00085 00086 /** \file xml.h 00087 * 00088 * \brief Implementations of Reader and Writer interfaces for XML. 00089 * 00090 * The xml.h header file defines implementations of the I/O 00091 * reader and writer. 00092 * 00093 * The inclusion of this file does not force a link to both, 00094 * the reader and writer. You can still use only one of the 00095 * classes. 00096 */ 00097 00098 00099 00100 00101 /// An implementation of x3dio::Reader used to read a stream and convert it to a tree of x3d nodes 00102 class XMLReader : public x3dio::Reader 00103 { 00104 public: 00105 XMLReader(); 00106 virtual ~XMLReader(); 00107 00108 virtual x3d::SFNodePtr Load(x3dio::Stream *stream, x3dio::ErrorCallback *callback = 0); 00109 }; 00110 00111 00112 00113 /// An implementation of x3dio::Writer used to write a tree of nodes to a stream in XML format 00114 class XMLWriter : public x3dio::Writer 00115 { 00116 public: 00117 XMLWriter(); 00118 virtual ~XMLWriter(); 00119 00120 virtual bool Save(x3dio::Stream *stream, const x3d::SFNode* node, x3dio::ErrorCallback *callback = 0); 00121 }; 00122 00123 00124 00125 00126 00127 00128 00129 }; // namespace x3dxml 00130 00131 00132 00133 // vim: ts=8 00134 #endif // #ifndef __LIBX3D_XML_H__ |
||||