+ class SAML_DLLLOCAL DelegateImpl : public virtual Delegate,
+ public AbstractComplexElement,
+ public AbstractDOMCachingXMLObject,
+ public AbstractXMLObjectMarshaller,
+ public AbstractXMLObjectUnmarshaller
+ {
+ void init() {
+ m_ConfirmationMethod=NULL;
+ m_DelegationInstant=NULL;
+ m_BaseID=NULL;
+ m_NameID=NULL;
+ m_EncryptedID=NULL;
+ m_children.push_back(NULL);
+ m_children.push_back(NULL);
+ m_children.push_back(NULL);
+ m_pos_BaseID=m_children.begin();
+ m_pos_NameID=m_pos_BaseID;
+ ++m_pos_NameID;
+ m_pos_EncryptedID=m_pos_NameID;
+ ++m_pos_EncryptedID;
+ }
+ public:
+ virtual ~DelegateImpl() {
+ XMLString::release(&m_ConfirmationMethod);
+ delete m_DelegationInstant;
+ }
+
+ DelegateImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
+ : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+ init();
+ }
+
+ DelegateImpl(const DelegateImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
+ init();
+ setConfirmationMethod(src.getConfirmationMethod());
+ setDelegationInstant(src.getDelegationInstant());
+ if (src.getBaseID())
+ setBaseID(src.getBaseID()->cloneBaseID());
+ if (src.getNameID())
+ setNameID(src.getNameID()->cloneNameID());
+ if (src.getEncryptedID())
+ setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
+ }
+
+ IMPL_XMLOBJECT_CLONE(Delegate);
+ IMPL_STRING_ATTRIB(ConfirmationMethod);
+ IMPL_DATETIME_ATTRIB(DelegationInstant,0);
+ IMPL_TYPED_CHILD(NameID);
+ IMPL_TYPED_CHILD(BaseID);
+ IMPL_TYPED_CHILD(EncryptedID);
+
+ protected:
+ void marshallAttributes(DOMElement* domElement) const {
+ MARSHALL_STRING_ATTRIB(ConfirmationMethod,CONFIRMATIONMETHOD,NULL);
+ MARSHALL_DATETIME_ATTRIB(DelegationInstant,DELEGATIONINSTANT,NULL);
+ }
+
+ void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
+ PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
+ PROC_TYPED_CHILD(NameID,SAML20_NS,false);
+ PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
+ AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
+ }
+
+ void processAttribute(const DOMAttr* attribute) {
+ PROC_STRING_ATTRIB(ConfirmationMethod,CONFIRMATIONMETHOD,NULL);
+ PROC_DATETIME_ATTRIB(DelegationInstant,DELEGATIONINSTANT,NULL);
+ AbstractXMLObjectUnmarshaller::processAttribute(attribute);
+ }
+ };
+
+ class SAML_DLLLOCAL DelegationRestrictionTypeImpl : public virtual DelegationRestrictionType,
+ public AbstractComplexElement,
+ public AbstractDOMCachingXMLObject,
+ public AbstractXMLObjectMarshaller,
+ public AbstractXMLObjectUnmarshaller
+ {
+ public:
+ virtual ~DelegationRestrictionTypeImpl() {}
+
+ DelegationRestrictionTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
+ : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+ }
+
+ DelegationRestrictionTypeImpl(const DelegationRestrictionTypeImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
+ VectorOf(Delegate) v=getDelegates();
+ for (vector<Delegate*>::const_iterator i=src.m_Delegates.begin(); i!=src.m_Delegates.end(); i++) {
+ if (*i) {
+ v.push_back((*i)->cloneDelegate());
+ }
+ }
+ }
+
+ IMPL_XMLOBJECT_CLONE(DelegationRestrictionType);
+ Condition* cloneCondition() const {
+ return cloneDelegationRestrictionType();
+ }
+ IMPL_TYPED_CHILDREN(Delegate,m_children.end());
+
+ protected:
+ void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
+ PROC_TYPED_CHILDREN(Delegate,SAML20_DELEGATION_CONDITION_NS,false);
+ AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
+ }
+ };