Reducing header overuse, non-inlining selected methods (CPPOST-35).
[shibboleth/cpp-xmltooling.git] / xmltooling / AbstractDOMCachingXMLObject.cpp
index b8d3b42..476eccd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Internet2
+ *  Copyright 2001-2009 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,12 +33,26 @@ using namespace xmltooling;
 using namespace xercesc;
 using namespace std;
 
+AbstractDOMCachingXMLObject::AbstractDOMCachingXMLObject() : m_dom(NULL), m_document(NULL)
+{
+}
+
+AbstractDOMCachingXMLObject::AbstractDOMCachingXMLObject(const AbstractDOMCachingXMLObject& src)
+    : AbstractXMLObject(src), m_dom(NULL), m_document(NULL)
+{
+}
+
 AbstractDOMCachingXMLObject::~AbstractDOMCachingXMLObject()
 {
     if (m_document)
         m_document->release();
 }
 
+DOMElement* AbstractDOMCachingXMLObject::getDOM() const
+{
+    return m_dom;
+}
+
 void AbstractDOMCachingXMLObject::setDOM(DOMElement* dom, bool bindDocument) const
 {
     m_dom=dom;
@@ -49,6 +63,13 @@ void AbstractDOMCachingXMLObject::setDOM(DOMElement* dom, bool bindDocument) con
     }
 }
 
+void AbstractDOMCachingXMLObject::setDocument(DOMDocument* doc) const
+{
+    if (m_document)
+        m_document->release();
+    m_document=doc;
+}
+
 void AbstractDOMCachingXMLObject::releaseDOM() const
 {
     if (m_dom) {