Macros to declare static QNames.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 7 Nov 2007 20:58:51 +0000 (20:58 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 7 Nov 2007 20:58:51 +0000 (20:58 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@416 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/base.h

index 3a7fe84..d1c3d23 100644 (file)
 #define END_XMLOBJECT }
 
 /**
+ * Declares a static variable holding the XMLObject's element QName.
+ */
+#define DECL_ELEMENT_QNAME \
+    public: \
+        XMLTOOLING_DOXYGEN(Element QName) \
+        static xmltooling::QName ELEMENT_QNAME
+
+/**
+ * Declares a static variable holding the XMLObject's schema type QName.
+ */
+#define DECL_TYPE_QNAME \
+    public: \
+        XMLTOOLING_DOXYGEN(Type QName) \
+        static xmltooling::QName TYPE_QNAME
+
+/**
+ * Implements a static variable holding an XMLObject's element QName.
+ * 
+ * @param cname             the name of the XMLObject specialization
+ * @param namespaceURI      the XML namespace of the default associated element
+ * @param namespacePrefix   the XML namespace prefix of the default associated element
+ */
+#define IMPL_ELEMENT_QNAME(cname,namespaceURI,namespacePrefix) \
+    xmltooling::QName cname::ELEMENT_QNAME(namespaceURI,cname::LOCAL_NAME,namespacePrefix)
+
+/**
+ * Implements a static variable holding an XMLObject's schema type QName.
+ * 
+ * @param cname             the name of the XMLObject specialization
+ * @param namespaceURI      the XML namespace of the default associated element
+ * @param namespacePrefix   the XML namespace prefix of the default associated element
+ */
+#define IMPL_TYPE_QNAME(cname,namespaceURI,namespacePrefix) \
+    xmltooling::QName cname::TYPE_QNAME(namespaceURI,cname::TYPE_NAME,namespacePrefix)
+
+/**
  * Declares abstract set method for a typed XML attribute.
  * The get method is omitted.
  *