projects
/
shibboleth
/
cpp-xmltooling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
https://issues.shibboleth.net/jira/browse/SSPCPP-647
[shibboleth/cpp-xmltooling.git]
/
xmltooling
/
AbstractAttributeExtensibleXMLObject.cpp
diff --git
a/xmltooling/AbstractAttributeExtensibleXMLObject.cpp
b/xmltooling/AbstractAttributeExtensibleXMLObject.cpp
index
1f819f6
..
166e96c
100644
(file)
--- a/
xmltooling/AbstractAttributeExtensibleXMLObject.cpp
+++ b/
xmltooling/AbstractAttributeExtensibleXMLObject.cpp
@@
-112,13
+112,19
@@
AbstractAttributeExtensibleXMLObject::AbstractAttributeExtensibleXMLObject(const
AbstractAttributeExtensibleXMLObject::~AbstractAttributeExtensibleXMLObject()
{
AbstractAttributeExtensibleXMLObject::~AbstractAttributeExtensibleXMLObject()
{
+#ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE
+ static void (*release)(XMLCh**) = &XMLString::release;
+#else
static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release;
static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release;
+#endif
for_each(
m_attributeMap.begin(), m_attributeMap.end(),
lambda::bind(
release,
for_each(
m_attributeMap.begin(), m_attributeMap.end(),
lambda::bind(
release,
- &lambda::bind(&map<xmltooling::QName,XMLCh*>::value_type::second, boost::ref(_1)),
- XMLPlatformUtils::fgMemoryManager
+ &lambda::bind(&map<xmltooling::QName,XMLCh*>::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;
}
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<xmltooling::QName,XMLCh*>::iterator i=m_attributeMap.find(qualifiedName);
void AbstractAttributeExtensibleXMLObject::setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID)
{
map<xmltooling::QName,XMLCh*>::iterator i=m_attributeMap.find(qualifiedName);