\r
/**\r
* Extension of AbstractXMLObject that implements a DOMCachingXMLObject.\r
+ * This is the primary base class for XMLObject implementation classes to use.\r
*/\r
class XMLTOOL_API AbstractDOMCachingXMLObject : public AbstractXMLObject, public DOMCachingXMLObject\r
{\r
}\r
}\r
\r
+ /**\r
+ * @see XMLObject::clone()\r
+ */\r
+ XMLObject* clone() const;\r
+\r
protected:\r
/**\r
+ * Constructor\r
+ * \r
+ * @param namespaceURI the namespace the element is in\r
+ * @param elementLocalName the local name of the XML element this Object represents\r
+ */\r
+ AbstractDOMCachingXMLObject(const XMLCh* namespaceURI=NULL, const XMLCh* elementLocalName=NULL, const XMLCh* namespacePrefix=NULL)\r
+ : AbstractXMLObject(namespaceURI,elementLocalName, namespacePrefix), m_dom(NULL), m_document(NULL) {}\r
+\r
+ /**\r
+ * If a DOM representation exists, this clones it into a new document.\r
+ * \r
+ * @param doc the document to clone into, or NULL, in which case a new document is created\r
+ * @return the cloned DOM\r
+ */\r
+ DOMElement* cloneDOM(DOMDocument* doc=NULL) const;\r
+\r
+ /**\r
* A helper function for derived classes.\r
* This 'normalizes' newString and then if it is different from oldString\r
* invalidates the DOM. It returns the normalized value.\r
*/\r
XMLObject* prepareForAssignment(const XMLObject* oldValue, XMLObject* newValue);\r
\r
- /**\r
- * Constructor\r
- * \r
- * @param namespaceURI the namespace the element is in\r
- * @param elementLocalName the local name of the XML element this Object represents\r
- */\r
- AbstractDOMCachingXMLObject(const XMLCh* namespaceURI=NULL, const XMLCh* elementLocalName=NULL, const XMLCh* namespacePrefix=NULL)\r
- : AbstractXMLObject(namespaceURI,elementLocalName, namespacePrefix), m_dom(NULL), m_document(NULL) {}\r
-\r
private:\r
DOMElement* m_dom;\r
DOMDocument* m_document;\r