Reducing header overuse, non-inlining selected methods (CPPOST-35).
[shibboleth/cpp-xmltooling.git] / xmltooling / AbstractXMLObject.h
index 9d6319e..b7b22dc 100644 (file)
@@ -24,8 +24,8 @@
 #define __xmltooling_abstractxmlobj_h__
 
 #include <xmltooling/logging.h>
+#include <xmltooling/QName.h>
 #include <xmltooling/XMLObject.h>
-#include <xmltooling/util/DateTime.h>
 
 #if defined (_MSC_VER)
     #pragma warning( push )
@@ -34,6 +34,8 @@
 
 namespace xmltooling {
 
+    class XMLTOOL_API DateTime;
+
     /**
      * An abstract implementation of XMLObject.
      * This is the primary concrete base class, and supplies basic namespace,
@@ -46,52 +48,19 @@ namespace xmltooling {
     public:
         virtual ~AbstractXMLObject();
 
+        // Virtual function overrides.
         void detach();
-
-        const QName& getElementQName() const {
-            return m_elementQname;
-        }
-
-        const std::set<Namespace>& getNamespaces() const {
-            return m_namespaces;
-        }
-
+        const QName& getElementQName() const;
+        const std::set<Namespace>& getNamespaces() const;
         void addNamespace(const Namespace& ns) const;
-
-        void removeNamespace(const Namespace& ns) {
-            m_namespaces.erase(ns);
-        }
-
-        const QName* getSchemaType() const {
-            return m_typeQname;
-        }
-
-        const XMLCh* getXMLID() const {
-            return NULL;
-        }
-
-        xmlconstants::xmltooling_bool_t getNil() const {
-               return m_nil;
-        }
-
-        void nil(xmlconstants::xmltooling_bool_t value) {
-            if (m_nil != value) {
-               releaseThisandParentDOM();
-               m_nil = value;
-            }
-        }
-
-        bool hasParent() const {
-            return m_parent != NULL;
-        }
-
-        XMLObject* getParent() const {
-            return m_parent;
-        }
-
-        void setParent(XMLObject* parent) {
-            m_parent = parent;
-        }
+        void removeNamespace(const Namespace& ns);
+        const QName* getSchemaType() const;
+        const XMLCh* getXMLID() const;
+        xmlconstants::xmltooling_bool_t getNil() const;
+        void nil(xmlconstants::xmltooling_bool_t value);
+        bool hasParent() const;
+        XMLObject* getParent() const;
+        void setParent(XMLObject* parent);
 
      protected:
         /**