- setMinorVersion(src.m_MinorVersion);
- setAssertionID(src.getAssertionID());
- setIssuer(src.getIssuer());
- setIssueInstant(src.getIssueInstant());
- if (src.getConditions())
- setConditions(src.getConditions()->cloneConditions());
- if (src.getAdvice())
- setAdvice(src.getAdvice()->cloneAdvice());
- if (src.getSignature())
- setSignature(src.getSignature()->cloneSignature());
- for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
- if (*i) {
- AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
- if (authst) {
- getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
- continue;
- }
-
- AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
- if (attst) {
- getAttributeStatements().push_back(attst->cloneAttributeStatement());
- continue;
- }
-
- AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
- if (authzst) {
- getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
- continue;
- }
-
- SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
- if (subst) {
- getSubjectStatements().push_back(subst->cloneSubjectStatement());
- continue;
- }
-
- Statement* st=dynamic_cast<Statement*>(*i);
- if (st) {
- getStatements().push_back(st->cloneStatement());
- continue;
- }
- }
- }
+ IMPL_CLONE_INTEGER_ATTRIB(MinorVersion);
+ IMPL_CLONE_ATTRIB(AssertionID);
+ IMPL_CLONE_ATTRIB(Issuer);
+ IMPL_CLONE_ATTRIB(IssueInstant);
+ IMPL_CLONE_TYPED_CHILD(Conditions);
+ IMPL_CLONE_TYPED_CHILD(Advice);
+ IMPL_CLONE_TYPED_CHILD(Signature);
+ IMPL_CLONE_CHILDBAG_BEGIN;
+ IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthenticationStatement);
+ IMPL_CLONE_TYPED_CHILD_IN_BAG(AttributeStatement);
+ IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthorizationDecisionStatement);
+ IMPL_CLONE_TYPED_CHILD_IN_BAG(SubjectStatement);
+ IMPL_CLONE_TYPED_CHILD_IN_BAG(Statement);
+ IMPL_CLONE_CHILDBAG_END;