X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Fimpl%2FAnyElement.cpp;h=27c17029f4f834ee4913daee8c8cda5209cedb1c;hb=bd026f07e729e66127b3efd48aee443fba815af3;hp=c90726aedc7cc4d18beed1f3f64152a28a5e438b;hpb=0ed92f33848d3f83e685364fafca1b1417dbd53c;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/impl/AnyElement.cpp b/xmltooling/impl/AnyElement.cpp index c90726a..27c1702 100644 --- a/xmltooling/impl/AnyElement.cpp +++ b/xmltooling/impl/AnyElement.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,8 +29,22 @@ #include using namespace xmltooling; +using namespace xercesc; using namespace std; +AnyElementImpl::AnyElementImpl() +{ +} + +AnyElementImpl::AnyElementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) +{ +} + +AnyElementImpl::~AnyElementImpl() +{ +} + XMLObject* AnyElementImpl::clone() const { auto_ptr domClone(AbstractDOMCachingXMLObject::clone()); AnyElementImpl* ret=dynamic_cast(domClone.get()); @@ -42,27 +56,34 @@ XMLObject* AnyElementImpl::clone() const { return new AnyElementImpl(*this); } -AnyElementImpl::AnyElementImpl(const AnyElementImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), - AbstractComplexElement(src), AbstractAttributeExtensibleXMLObject(src) { +AnyElementImpl::AnyElementImpl(const AnyElementImpl& src) + : AbstractXMLObject(src), + AbstractDOMCachingXMLObject(src), + AbstractComplexElement(src), + AbstractAttributeExtensibleXMLObject(src) { const vector& children = src.getUnknownXMLObjects(); for (vector::const_iterator i=children.begin(); i!=children.end(); ++i) getUnknownXMLObjects().push_back((*i)->clone()); } -void AnyElementImpl::marshallAttributes(DOMElement* domElement) const { +void AnyElementImpl::marshallAttributes(DOMElement* domElement) const +{ marshallExtensionAttributes(domElement); } -void AnyElementImpl::processChildElement(XMLObject* childXMLObject, const DOMElement* root) { +void AnyElementImpl::processChildElement(XMLObject* childXMLObject, const DOMElement* root) +{ getUnknownXMLObjects().push_back(childXMLObject); } -void AnyElementImpl::processAttribute(const DOMAttr* attribute) { +void AnyElementImpl::processAttribute(const DOMAttr* attribute) +{ unmarshallExtensionAttribute(attribute); } XMLObject* AnyElementBuilder::buildObject( - const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType - ) const { + const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType + ) const +{ return new AnyElementImpl(nsURI, localName, prefix, schemaType); }