#include "internal.h"
#include "AbstractAttributeExtensibleXMLObject.h"
-#include "AbstractChildlessElement.h"
-#include "AbstractElementProxy.h"
+#include "AbstractComplexElement.h"
+#include "AbstractSimpleElement.h"
#include "exceptions.h"
#include "encryption/Encryption.h"
#include "io/AbstractXMLObjectMarshaller.h"
using namespace xmlencryption;
using namespace xmltooling;
using namespace std;
+using xmlconstants::XMLENC_NS;
+using xmlconstants::XMLSIG_NS;
#if defined (_MSC_VER)
#pragma warning( push )
init();
}
- EncryptionMethodImpl(const EncryptionMethodImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ EncryptionMethodImpl(const EncryptionMethodImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
init();
setAlgorithm(src.getAlgorithm());
if (src.getKeySize())
setKeySize(src.getKeySize()->cloneKeySize());
if (src.getOAEPparams())
setOAEPparams(src.getOAEPparams()->cloneOAEPparams());
- VectorOf(XMLObject) v=getOtherParameters();
- for (vector<XMLObject*>::const_iterator i=src.m_OtherParameters.begin(); i!=src.m_OtherParameters.end(); i++) {
- if (*i) {
- v.push_back((*i)->clone());
- }
- }
+ VectorOf(XMLObject) v=getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(EncryptionMethod);
IMPL_STRING_ATTRIB(Algorithm);
IMPL_TYPED_CHILD(KeySize);
IMPL_TYPED_CHILD(OAEPparams);
- IMPL_XMLOBJECT_CHILDREN(OtherParameter,m_children.end());
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void marshallAttributes(DOMElement* domElement) const {
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILD(KeySize,XMLConstants::XMLENC_NS,false);
- PROC_TYPED_CHILD(OAEPparams,XMLConstants::XMLENC_NS,false);
+ PROC_TYPED_CHILD(KeySize,XMLENC_NS,false);
+ PROC_TYPED_CHILD(OAEPparams,XMLENC_NS,false);
// Unknown child.
const XMLCh* nsURI=root->getNamespaceURI();
- if (!XMLString::equals(nsURI,XMLConstants::XMLENC_NS) && nsURI && *nsURI) {
- getOtherParameters().push_back(childXMLObject);
+ if (!XMLString::equals(nsURI,XMLENC_NS) && nsURI && *nsURI) {
+ getUnknownXMLObjects().push_back(childXMLObject);
return;
}
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
}
- TransformsImpl(const TransformsImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ TransformsImpl(const TransformsImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
VectorOf(xmlsignature::Transform) v=getTransforms();
for (vector<xmlsignature::Transform*>::const_iterator i=src.m_Transforms.begin(); i!=src.m_Transforms.end(); i++) {
if (*i) {
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,XMLConstants::XMLSIG_NS,false);
+ PROC_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,XMLSIG_NS,false);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
};
init();
}
- CipherReferenceImpl(const CipherReferenceImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ CipherReferenceImpl(const CipherReferenceImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
init();
setURI(src.getURI());
if (src.getTransforms())
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILD(Transforms,XMLConstants::XMLENC_NS,false);
+ PROC_TYPED_CHILD(Transforms,XMLENC_NS,false);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
init();
}
- CipherDataImpl(const CipherDataImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ CipherDataImpl(const CipherDataImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
init();
if (src.getCipherValue())
setCipherValue(src.getCipherValue()->cloneCipherValue());
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILD(CipherValue,XMLConstants::XMLENC_NS,false);
- PROC_TYPED_CHILD(CipherReference,XMLConstants::XMLENC_NS,false);
+ PROC_TYPED_CHILD(CipherValue,XMLENC_NS,false);
+ PROC_TYPED_CHILD(CipherReference,XMLENC_NS,false);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
};
class XMLTOOL_DLLLOCAL EncryptionPropertyImpl : public virtual EncryptionProperty,
- public AbstractElementProxy,
public AbstractAttributeExtensibleXMLObject,
+ public AbstractComplexElement,
public AbstractDOMCachingXMLObject,
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
EncryptionPropertyImpl(const EncryptionPropertyImpl& src)
: AbstractXMLObject(src),
- AbstractElementProxy(src),
AbstractAttributeExtensibleXMLObject(src),
+ AbstractComplexElement(src),
AbstractDOMCachingXMLObject(src) {
init();
setId(src.getId());
setTarget(src.getTarget());
- for (list<XMLObject*>::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<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(EncryptionProperty);
IMPL_ID_ATTRIB(Id);
IMPL_STRING_ATTRIB(Target);
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end());
void setAttribute(QName& qualifiedName, const XMLCh* value) {
if (!qualifiedName.hasNamespaceURI()) {
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- getXMLObjects().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
}
void processAttribute(const DOMAttr* attribute) {
init();
}
- EncryptionPropertiesImpl(const EncryptionPropertiesImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ EncryptionPropertiesImpl(const EncryptionPropertiesImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
init();
setId(src.getId());
VectorOf(EncryptionProperty) v=getEncryptionPropertys();
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILDREN(EncryptionProperty,XMLConstants::XMLENC_NS,false);
+ PROC_TYPED_CHILDREN(EncryptionProperty,XMLENC_NS,false);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
};
class XMLTOOL_DLLLOCAL ReferenceTypeImpl : public virtual ReferenceType,
- public AbstractElementProxy,
+ public AbstractComplexElement,
public AbstractDOMCachingXMLObject,
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
}
ReferenceTypeImpl(const ReferenceTypeImpl& src)
- : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
init();
setURI(src.getURI());
- for (list<XMLObject*>::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<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(ReferenceType);
IMPL_STRING_ATTRIB(URI);
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void marshallAttributes(DOMElement* domElement) const {
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- getXMLObjects().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
}
void processAttribute(const DOMAttr* attribute) {
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
}
- ReferenceListImpl(const ReferenceListImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ ReferenceListImpl(const ReferenceListImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
if (*i) {
DataReference* data=dynamic_cast<DataReference*>(*i);
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILDREN(DataReference,XMLConstants::XMLENC_NS,false);
- PROC_TYPED_CHILDREN(KeyReference,XMLConstants::XMLENC_NS,false);
+ PROC_TYPED_CHILDREN(DataReference,XMLENC_NS,false);
+ PROC_TYPED_CHILDREN(KeyReference,XMLENC_NS,false);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
};
init();
}
- EncryptedTypeImpl(const EncryptedTypeImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ EncryptedTypeImpl(const EncryptedTypeImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
init();
setId(src.getId());
setType(src.getType());
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILD(EncryptionMethod,XMLConstants::XMLENC_NS,false);
- PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
- PROC_TYPED_CHILD(CipherData,XMLConstants::XMLENC_NS,false);
- PROC_TYPED_CHILD(EncryptionProperties,XMLConstants::XMLENC_NS,false);
+ PROC_TYPED_CHILD(EncryptionMethod,XMLENC_NS,false);
+ PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
+ PROC_TYPED_CHILD(CipherData,XMLENC_NS,false);
+ PROC_TYPED_CHILD(EncryptionProperties,XMLENC_NS,false);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILD(ReferenceList,XMLConstants::XMLENC_NS,false);
- PROC_TYPED_CHILD(CarriedKeyName,XMLConstants::XMLENC_NS,false);
+ PROC_TYPED_CHILD(ReferenceList,XMLENC_NS,false);
+ PROC_TYPED_CHILD(CarriedKeyName,XMLENC_NS,false);
EncryptedTypeImpl::processChildElement(childXMLObject,root);
}