From: cantor Date: Thu, 2 Oct 2008 18:41:50 +0000 (+0000) Subject: https://bugs.internet2.edu/jira/browse/CPPXT-20 X-Git-Tag: 1.4.1~299 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=commitdiff_plain;h=aa98ae48bcc76399dcda85c5e8fcea4ed0017e69 https://bugs.internet2.edu/jira/browse/CPPXT-20 git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@532 de75baf8-a10c-0410-a50a-987c0e22f00f --- diff --git a/xmltooling/base.h b/xmltooling/base.h index 05128dd..77754ff 100644 --- a/xmltooling/base.h +++ b/xmltooling/base.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2008 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -684,6 +684,26 @@ } /** + * Implements get/set methods and a private member for a typed, qualified XML attribute. + * + * @param proper the proper name of the attribute + * @param type the attribute's data type + */ +#define IMPL_XMLOBJECT_FOREIGN_ATTRIB(proper,type) \ + protected: \ + XMLCh* m_##proper##Prefix; \ + type* m_##proper; \ + public: \ + const type* get##proper() const { \ + return m_##proper; \ + } \ + void set##proper(const type* proper) { \ + m_##proper = prepareForAssignment(m_##proper,proper); \ + XMLString::release(&m_##proper##Prefix); \ + m_##proper##Prefix = NULL; \ + } + +/** * Declares abstract set method for a typed XML child object in a foreign namespace. * The get method is omitted. *