/*
- * 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.
*/
/**
- * @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.
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
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.
*
#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.