#include <xmltooling/AbstractDOMCachingXMLObject.h>
Inheritance diagram for xmltooling::AbstractDOMCachingXMLObject:
Public Member Functions | |
xercesc::DOMElement * | getDOM () const |
Gets the DOM representation of this XMLObject, if one exists. | |
void | setDOM (xercesc::DOMElement *dom, bool bindDocument=false) const |
Sets the DOM representation of this XMLObject. | |
void | setDocument (xercesc::DOMDocument *doc) const |
Assigns ownership of a DOM document to the XMLObject. | |
virtual void | releaseDOM () const |
Releases the DOM representation of this XMLObject, if there is one. | |
virtual void | releaseParentDOM (bool propagateRelease=true) const |
Releases the DOM representation of this XMLObject's parent. | |
virtual void | releaseChildrenDOM (bool propagateRelease=true) const |
Releases the DOM representation of this XMLObject's children. | |
XMLObject * | clone () const |
Creates a copy of the object, along with all of its children. | |
void | detach () |
Specialized function for detaching a child object from its parent while disposing of the parent. | |
Protected Member Functions | |
AbstractDOMCachingXMLObject (const AbstractDOMCachingXMLObject &src) | |
Copy constructor. | |
xercesc::DOMElement * | cloneDOM (xercesc::DOMDocument *doc=NULL) const |
If a DOM representation exists, this clones it into a new document. |
Inherit from this class to implement standard DOM caching behavior.
XMLObject* xmltooling::AbstractDOMCachingXMLObject::clone | ( | ) | const [virtual] |
Creates a copy of the object, along with all of its children.
The new object tree will be completely distinct and independent of the original in all respects.
Implements xmltooling::XMLObject.
xercesc::DOMElement* xmltooling::AbstractDOMCachingXMLObject::cloneDOM | ( | xercesc::DOMDocument * | doc = NULL |
) | const [protected] |
If a DOM representation exists, this clones it into a new document.
doc | the document to clone into, or NULL, in which case a new document is created |
void xmltooling::AbstractDOMCachingXMLObject::detach | ( | ) | [virtual] |
Specialized function for detaching a child object from its parent while disposing of the parent.
This is not a generic way of detaching any child object, but only of pruning a single child from the root of an XMLObject tree. If the detached XMLObject's parent is itself a child, an exception will be thrown. It's mainly useful for turning a child into the new root of the tree without having to clone the child.
Reimplemented from xmltooling::AbstractXMLObject.
xercesc::DOMElement* xmltooling::AbstractDOMCachingXMLObject::getDOM | ( | ) | const [inline, virtual] |
Gets the DOM representation of this XMLObject, if one exists.
Implements xmltooling::XMLObject.
virtual void xmltooling::AbstractDOMCachingXMLObject::releaseChildrenDOM | ( | bool | propagateRelease = true |
) | const [virtual] |
Releases the DOM representation of this XMLObject's children.
propagateRelease | true if all descendants of this element should release their DOM |
Implements xmltooling::XMLObject.
virtual void xmltooling::AbstractDOMCachingXMLObject::releaseParentDOM | ( | bool | propagateRelease = true |
) | const [virtual] |
Releases the DOM representation of this XMLObject's parent.
propagateRelease | true if all ancestors of this element should release their DOM |
Implements xmltooling::XMLObject.
void xmltooling::AbstractDOMCachingXMLObject::setDocument | ( | xercesc::DOMDocument * | doc | ) | const [inline, virtual] |
Assigns ownership of a DOM document to the XMLObject.
This binds the lifetime of the document to the lifetime of the object.
doc | DOM document bound to this object |
Implements xmltooling::XMLObject.
void xmltooling::AbstractDOMCachingXMLObject::setDOM | ( | xercesc::DOMElement * | dom, | |
bool | bindDocument = false | |||
) | const [virtual] |
Sets the DOM representation of this XMLObject.
dom | DOM representation of this XMLObject | |
bindDocument | true if the object should take ownership of the associated Document |
Implements xmltooling::XMLObject.