Main Page   Class Hierarchy   Compound List   File List   Compound Members  

XMLDocument.h

00001 // Copyright (C) 2001 Kevin Duffy <kevin@buhbird.com>
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License, or (at your option) any later version.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00016 #ifndef XMLDOCUMENT_H
00017 #define XMLDOCUMENT_H
00018 
00019 #include <Object.h>
00020 #include <Writeable.h>
00021 #include <Element.h>
00022 #include <ProcessingInstruction.h>
00023 #include <SpecialTag.h>
00024 
00026 class XMLDocument : virtual public Object,
00027                     virtual public Writeable
00028 {
00029    public:
00031 
00035       XMLDocument(const XMLProcInst& prolog = XMLProcInst("xml"),
00036                   const SpecialTag& doctype = SpecialTag(),
00037                   const XMLement* root = NULL,
00038                   const list<SpecialTag*>& footers = list<SpecialTag*>());
00039 
00041 
00042 
00043       XMLProcInst GetProlog() const;
00044 
00046       SpecialTag GetDocType() const;
00047 
00049       XMLement* GetRoot() const;
00050 
00052       list<SpecialTag*> GetFooters() const;
00053 
00055 
00056 
00058 
00059 
00060       void SetProlog(const XMLProcInst& newProlog);
00061 
00063       void SetDocType(const SpecialTag& doctype);
00064 
00066       void SetRoot(const XMLement* newRoot);
00067 
00069       void SetFooters(const list<SpecialTag*> newFooters);
00070 
00072       virtual string ToString() const;
00073 
00074    protected:
00076 
00077       void Init(const XMLProcInst& newProlog,
00078                 const SpecialTag& doctype,
00079                 const XMLement* newRoot,
00080                 const list<SpecialTag*>& footers);
00081 
00083       XMLDocument& Copy(const XMLDocument& rhs);
00084 
00086       void NullifyPointers();
00087 
00089       void Clear();
00090 
00092       bool Equals(const XMLDocument& rhs) const;
00093 
00094    private:
00095       XMLProcInst* prolog;
00096       SpecialTag* doctype;
00097       XMLement* root;
00098       list<SpecialTag*>* footerList;      
00099 };
00100 #endif

Generated at Wed Apr 4 21:04:50 2001 for libXMLDocument by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001