00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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