00001 #ifndef ParentNode_HEADER_GUARD_
00002 #define ParentNode_HEADER_GUARD_
00003
00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 00070 00071
00072
00083
00084 #include <util/XercesDefs.hpp>
00085 #include "ChildNode.hpp"
00086 #include "DOMString.hpp"
00087
00088
00089 #ifndef THIS_CLASS
00090 #define THIS_CLASS ParentNode
00091 #endif
00092 #ifndef PARENT_CLASS
00093 #define PARENT_CLASS NodeImpl
00094 #endif
00095
00096 class THIS_CLASS: public PARENT_CLASS {
00097 public:
00098 DocumentImpl *ownerDocument;
00099
00100 ChildNode *firstChild;
00101
00102 int fChanges;
00103
00104 public:
00105 THIS_CLASS(DocumentImpl *ownerDocument);
00106 THIS_CLASS(const THIS_CLASS &other);
00107
00108 virtual DocumentImpl * getOwnerDocument();
00109 virtual void setOwnerDocument(DocumentImpl *doc);
00110
00111 virtual int changes();
00112 virtual void changed();
00113
00114 virtual NodeListImpl *getChildNodes();
00115 virtual NodeImpl * getFirstChild();
00116 virtual NodeImpl * getLastChild();
00117 virtual unsigned int getLength();
00118 virtual bool hasChildNodes();
00119 virtual NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild);
00120 virtual NodeImpl *item(unsigned int index);
00121 virtual NodeImpl * removeChild(NodeImpl *oldChild);
00122 virtual NodeImpl *replaceChild(NodeImpl *newChild, NodeImpl *oldChild);
00123 virtual void setReadOnly(bool readOnly, bool deep);
00124
00125
00126 virtual void normalize();
00127
00128
00129
00130 virtual DocumentImpl * getDocument();
00131 protected:
00132 void cloneChildren(const NodeImpl &other);
00133 ChildNode * lastChild();
00134 void lastChild(ChildNode *);
00135 };
00136
00137 #undef THIS_CLASS
00138 #undef PARENT_CLASS
00139 #endif