X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=blobdiff_plain;f=xmltooling%2FAbstractAttributeExtensibleXMLObject.cpp;h=166e96c696a50c7b1773fb321cba160892577387;hp=1f819f661541e5fd87658381899d4d40ca9e8489;hb=HEAD;hpb=e93ce2c962c535ff88f26427e9aeb572f83976e1 diff --git a/xmltooling/AbstractAttributeExtensibleXMLObject.cpp b/xmltooling/AbstractAttributeExtensibleXMLObject.cpp index 1f819f6..166e96c 100644 --- a/xmltooling/AbstractAttributeExtensibleXMLObject.cpp +++ b/xmltooling/AbstractAttributeExtensibleXMLObject.cpp @@ -112,13 +112,19 @@ AbstractAttributeExtensibleXMLObject::AbstractAttributeExtensibleXMLObject(const AbstractAttributeExtensibleXMLObject::~AbstractAttributeExtensibleXMLObject() { +#ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE + static void (*release)(XMLCh**) = &XMLString::release; +#else static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release; +#endif for_each( m_attributeMap.begin(), m_attributeMap.end(), lambda::bind( release, - &lambda::bind(&map::value_type::second, boost::ref(_1)), - XMLPlatformUtils::fgMemoryManager + &lambda::bind(&map::value_type::second, boost::ref(_1)) +#ifndef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE + ,XMLPlatformUtils::fgMemoryManager +#endif ) ); } @@ -129,6 +135,13 @@ const XMLCh* AbstractAttributeExtensibleXMLObject::getAttribute(const xmltooling return (i != m_attributeMap.end()) ? i->second : nullptr; } +const XMLCh* AbstractAttributeExtensibleXMLObject::getLang() const +{ + static const XMLCh _lang[] = UNICODE_LITERAL_4(l,a,n,g); + static xmltooling::QName qname(xmlconstants::XML_NS, _lang); + return getAttribute(qname); +} + void AbstractAttributeExtensibleXMLObject::setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID) { map::iterator i=m_attributeMap.find(qualifiedName);