https://bugs.internet2.edu/jira/browse/CPPXT-20
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Thu, 2 Oct 2008 18:41:50 +0000 (18:41 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Thu, 2 Oct 2008 18:41:50 +0000 (18:41 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@532 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/base.h

index 05128dd..77754ff 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- *  Copyright 2001-2007 Internet2\r
+ *  Copyright 2001-2008 Internet2\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
         }\r
 \r
 /**\r
+ * Implements get/set methods and a private member for a typed, qualified XML attribute.\r
+ *\r
+ * @param proper    the proper name of the attribute\r
+ * @param type      the attribute's data type\r
+ */\r
+#define IMPL_XMLOBJECT_FOREIGN_ATTRIB(proper,type) \\r
+    protected: \\r
+    XMLCh* m_##proper##Prefix; \\r
+        type* m_##proper; \\r
+    public: \\r
+        const type* get##proper() const { \\r
+            return m_##proper; \\r
+        } \\r
+        void set##proper(const type* proper) { \\r
+            m_##proper = prepareForAssignment(m_##proper,proper); \\r
+            XMLString::release(&m_##proper##Prefix); \\r
+            m_##proper##Prefix = NULL; \\r
+        }\r
+\r
+/**\r
  * Declares abstract set method for a typed XML child object in a foreign namespace.\r
  * The get method is omitted.\r
  *\r