X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Fsoap%2Fimpl%2FSOAPImpl.cpp;h=ebaeb91521d6ac6bf52ec28befd187e3c5a8f96c;hb=5cb314df178f78c6fa7b9826c2c5a5298ec7a473;hp=8f02f8a1711d3afb17fd5497ae50e82ceded052b;hpb=c50f3cc9a47e95fc3518e61703791d098ce3253d;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/soap/impl/SOAPImpl.cpp b/xmltooling/soap/impl/SOAPImpl.cpp index 8f02f8a..ebaeb91 100644 --- a/xmltooling/soap/impl/SOAPImpl.cpp +++ b/xmltooling/soap/impl/SOAPImpl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006 Internet2 + * Copyright 2001-2007 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ #include "internal.h" #include "AbstractAttributeExtensibleXMLObject.h" +#include "AbstractComplexElement.h" #include "AbstractSimpleElement.h" -#include "AbstractElementProxy.h" #include "exceptions.h" #include "io/AbstractXMLObjectMarshaller.h" #include "io/AbstractXMLObjectUnmarshaller.h" @@ -68,7 +68,7 @@ namespace { setCode(src.getCode()); } - QName* getCode() const { + const QName* getCode() const { return m_qname; } @@ -86,8 +86,8 @@ namespace { }; class XMLTOOL_DLLLOCAL DetailImpl : public virtual Detail, - public AbstractElementProxy, public AbstractAttributeExtensibleXMLObject, + public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller @@ -101,17 +101,16 @@ namespace { DetailImpl(const DetailImpl& src) : AbstractXMLObject(src), - AbstractElementProxy(src), AbstractAttributeExtensibleXMLObject(src), + AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { - for (list::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) { - if (*i) { - getXMLObjects().push_back((*i)->clone()); - } - } + VectorOf(XMLObject) v=getUnknownXMLObjects(); + for (vector::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) + v.push_back((*i)->clone()); } IMPL_XMLOBJECT_CLONE(Detail); + IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { @@ -119,7 +118,7 @@ namespace { } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { - getXMLObjects().push_back(childXMLObject); + getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) { @@ -193,8 +192,8 @@ namespace { }; class XMLTOOL_DLLLOCAL BodyImpl : public virtual Body, - public AbstractElementProxy, public AbstractAttributeExtensibleXMLObject, + public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller @@ -214,20 +213,19 @@ namespace { BodyImpl(const BodyImpl& src) : AbstractXMLObject(src), - AbstractElementProxy(src), AbstractAttributeExtensibleXMLObject(src), + AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); setEncodingStyle(src.getEncodingStyle()); - for (list::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) { - if (*i) { - getXMLObjects().push_back((*i)->clone()); - } - } + VectorOf(XMLObject) v=getUnknownXMLObjects(); + for (vector::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) + v.push_back((*i)->clone()); } IMPL_XMLOBJECT_CLONE(Body); IMPL_STRING_ATTRIB(EncodingStyle); + IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); void setAttribute(QName& qualifiedName, const XMLCh* value) { if (qualifiedName.hasNamespaceURI() && XMLString::equals(qualifiedName.getNamespaceURI(),SOAP11ENV_NS)) { @@ -246,7 +244,7 @@ namespace { } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { - getXMLObjects().push_back(childXMLObject); + getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) { @@ -255,8 +253,8 @@ namespace { }; class XMLTOOL_DLLLOCAL HeaderImpl : public virtual Header, - public AbstractElementProxy, public AbstractAttributeExtensibleXMLObject, + public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller @@ -277,22 +275,21 @@ namespace { HeaderImpl(const HeaderImpl& src) : AbstractXMLObject(src), - AbstractElementProxy(src), AbstractAttributeExtensibleXMLObject(src), + AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); setActor(src.getActor()); MustUnderstand(m_MustUnderstand); - for (list::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) { - if (*i) { - getXMLObjects().push_back((*i)->clone()); - } - } + VectorOf(XMLObject) v=getUnknownXMLObjects(); + for (vector::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) + v.push_back((*i)->clone()); } IMPL_XMLOBJECT_CLONE(Header); IMPL_STRING_ATTRIB(Actor); IMPL_BOOLEAN_ATTRIB(MustUnderstand); + IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); void setAttribute(QName& qualifiedName, const XMLCh* value) { if (qualifiedName.hasNamespaceURI() && XMLString::equals(qualifiedName.getNamespaceURI(),SOAP11ENV_NS)) { @@ -316,7 +313,7 @@ namespace { } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { - getXMLObjects().push_back(childXMLObject); + getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) {