Mark executable.
[shibboleth/xmltooling.git] / xmltooling / QName.h
index 296a58a..17d8d77 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2006 Internet2
+ *  Copyright 2001-2007 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
  */
 
 /**
- * @file QName.h
+ * @file xmltooling/QName.h
  * 
  * Representing XML QNames 
  */
 #include <algorithm>
 
 namespace xmltooling {
-    
+
+#if defined (_MSC_VER)
+    #pragma warning( push )
+    #pragma warning( disable : 4251 )
+#endif
+
     /**
      * A data structure for encapsulating XML QNames.
      * The Xerces class is too limited to use at the moment.
@@ -37,11 +42,21 @@ namespace xmltooling {
     public:
         /**
          * Constructor
+         * 
          * @param uri       namespace URI
          * @param localPart local name
          * @param prefix    namespace prefix (without the colon)
          */
         QName(const XMLCh* uri=NULL, const XMLCh* localPart=NULL, const XMLCh* prefix=NULL);
+
+        /**
+         * Constructor
+         * 
+         * @param uri       namespace URI
+         * @param localPart local name
+         * @param prefix    namespace prefix (without the colon)
+         */
+        QName(const char* uri, const char* localPart, const char* prefix=NULL);
         
         ~QName();
 #ifndef HAVE_GOOD_STL
@@ -149,6 +164,24 @@ namespace xmltooling {
         void setLocalPart(const XMLCh* localPart);
         
         /**
+         * Sets the namespace prefix
+         * @param prefix    Null-terminated ASCII string containing the prefix, without the colon
+         */
+        void setPrefix(const char* prefix);
+
+        /**
+         * Sets the namespace URI
+         * @param uri  Null-terminated ASCII string containing the URI
+         */
+        void setNamespaceURI(const char* uri);
+        
+        /**
+         * Sets the local part of the name
+         * @param localPart  Null-terminated ASCII string containing the local name
+         */
+        void setLocalPart(const char* localPart);
+        
+        /**
          * Gets a string representation of the QName for logging, etc.
          * Format is prefix:localPart or {namespaceURI}localPart if no prefix.
          * 
@@ -168,6 +201,10 @@ namespace xmltooling {
 #endif
     };
 
+#if defined (_MSC_VER)
+    #pragma warning( pop )
+#endif
+
     /**
      * Returns true iff op1's namespace lexically compares less than op2's namespace,
      * or if equal, iff op1's prefix lexically compares less than op2's prefix.