xmlfilewriter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // This file is part of libgvectors.
00004 // libgvectors is a C++ library intended for visualizing mathematical vectors.
00005 // Copyright (C) 2007  Rafael Ostertag
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
00020 // USA.
00021 //
00022 // $Id: xmlfilewriter_8h-source.html,v 1.1 2007-09-08 19:02:38 rafi Exp $
00023 //
00024 // File:   xmlfilewriter.h
00025 // Author: Rafael Ostertag
00026 //
00027 // Created on August 19, 2007, 3:37 PM
00028 //
00029 
00041 #ifndef _XMLFILEWRITER_H
00042 #define _XMLFILEWRITER_H
00043 
00044 #include <gvectors-config.h>
00045 
00046 #ifdef HAVE_LIBXML
00047 #include <stdio.h>
00048 
00049 #include <gvectortypes.h>
00050 #include <gvexceptions.h>
00051 #include <filewriter.h>
00052 
00053 namespace GVectors {
00061     class XMLWriter : public FileWriter {
00062     private:
00069         FILE* file;
00075         std::string filename;
00082         vslevel_t lastlevel;
00090         bool firstrun;
00099         bool tabify;
00100         
00101     protected:
00103         void put_tabs(vslevel_t no);
00104         
00105     public:
00107         XMLWriter(const std::string fn, bool tab=false);
00109         XMLWriter(const XMLWriter& xfw);
00111         virtual ~XMLWriter();
00112         
00114         void write(vslevel_t level, const vv_ref_t visualvector);
00115     };
00116 }
00117 
00118 #endif /* HAVE_LIBXML */
00119 
00120 #endif  /* _XMLFILEWRITER_H */
00121 

Generated on Sat Sep 8 19:37:29 2007 for libgvectors by  doxygen 1.4.7