Tightened up consts.
authorScott Cantor <cantor.2@osu.edu>
Tue, 21 Feb 2006 19:46:17 +0000 (19:46 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 21 Feb 2006 19:46:17 +0000 (19:46 +0000)
xmltooling/util/XMLHelper.cpp
xmltooling/util/XMLHelper.h

index cdd32a8..e5962d6 100644 (file)
@@ -30,7 +30,7 @@ using namespace xmltooling;
 \r
 static const XMLCh type[]={chLatin_t, chLatin_y, chLatin_p, chLatin_e, chNull };\r
     \r
-bool XMLHelper::hasXSIType(DOMElement* e)\r
+bool XMLHelper::hasXSIType(const DOMElement* e)\r
 {\r
     if (e) {\r
         if (e->hasAttributeNS(XMLConstants::XSI_NS, type)) {\r
@@ -41,7 +41,7 @@ bool XMLHelper::hasXSIType(DOMElement* e)
     return false;\r
 }\r
 \r
-QName* XMLHelper::getXSIType(DOMElement* e)\r
+QName* XMLHelper::getXSIType(const DOMElement* e)\r
 {\r
     DOMAttr* attribute = e->getAttributeNodeNS(XMLConstants::XSI_NS, type);\r
     if (attribute) {\r
@@ -60,7 +60,7 @@ QName* XMLHelper::getXSIType(DOMElement* e)
     return NULL;\r
 }\r
 \r
-DOMAttr* XMLHelper::getIdAttribute(DOMElement* domElement)\r
+DOMAttr* XMLHelper::getIdAttribute(const DOMElement* domElement)\r
 {\r
     if(!domElement->hasAttributes()) {\r
         return NULL;\r
@@ -78,14 +78,14 @@ DOMAttr* XMLHelper::getIdAttribute(DOMElement* domElement)
     return NULL;\r
 }\r
 \r
-QName* XMLHelper::getNodeQName(DOMNode* domNode)\r
+QName* XMLHelper::getNodeQName(const DOMNode* domNode)\r
 {\r
     if (domNode)\r
         return new QName(domNode->getNamespaceURI(), domNode->getLocalName(), domNode->getPrefix());\r
     return NULL; \r
 }\r
 \r
-QName* XMLHelper::getAttributeValueAsQName(DOMAttr* attribute)\r
+QName* XMLHelper::getAttributeValueAsQName(const DOMAttr* attribute)\r
 {\r
     if (!attribute)\r
         return NULL;\r
index 5d6925a..9cf69b9 100644 (file)
@@ -42,7 +42,7 @@ namespace xmltooling {
          * @param e the DOM element\r
          * @return true if there is a type, false if not\r
          */\r
-        static bool hasXSIType(DOMElement* e);\r
+        static bool hasXSIType(const DOMElement* e);\r
 \r
         /**\r
          * Gets the XSI type for a given element if it has one.\r
@@ -50,7 +50,7 @@ namespace xmltooling {
          * @param e the element\r
          * @return the type or null\r
          */\r
-        static QName* getXSIType(DOMElement* e);\r
+        static QName* getXSIType(const DOMElement* e);\r
 \r
         /**\r
          * Gets the ID attribute of a DOM element.\r
@@ -58,7 +58,7 @@ namespace xmltooling {
          * @param domElement the DOM element\r
          * @return the ID attribute or null if there isn't one\r
          */\r
-        static DOMAttr* getIdAttribute(DOMElement* domElement);\r
+        static DOMAttr* getIdAttribute(const DOMElement* domElement);\r
 \r
         /**\r
          * Gets the QName for the given DOM node.\r
@@ -66,7 +66,7 @@ namespace xmltooling {
          * @param domNode the DOM node\r
          * @return the QName for the element or null if the element was null\r
          */\r
-        static QName* getNodeQName(DOMNode* domNode);\r
+        static QName* getNodeQName(const DOMNode* domNode);\r
 \r
         /**\r
          * Constructs a QName from an attributes value.\r
@@ -74,7 +74,7 @@ namespace xmltooling {
          * @param attribute the attribute with a QName value\r
          * @return a QName from an attributes value, or null if the given attribute is null\r
          */\r
-        static QName* getAttributeValueAsQName(DOMAttr* attribute);\r
+        static QName* getAttributeValueAsQName(const DOMAttr* attribute);\r
 \r
         /**\r
          * Appends the child Element to the parent Element,\r