[cpp-opensaml COMMIT] in /branches/REL_2: saml/saml1/core/impl/AssertionsImpl.cpp saml/saml1/core/impl/ProtocolsImpl....
noreply at shibboleth.net
noreply at shibboleth.net
Mon Nov 21 21:46:19 GMT 2011
Author: scantor
Date: Mon Nov 21 21:46:19 2011
New Revision: 681
URL: http://svn.shibboleth.net/view/cpp-opensaml?rev=681&view=rev
Log:
https://issues.shibboleth.net/jira/browse/CPPOST-70
Modified:
branches/REL_2/saml/saml1/core/impl/AssertionsImpl.cpp
branches/REL_2/saml/saml1/core/impl/ProtocolsImpl.cpp
branches/REL_2/saml/saml2/core/impl/Assertions20Impl.cpp
branches/REL_2/saml/saml2/core/impl/Protocols20Impl.cpp
branches/REL_2/saml/saml2/metadata/impl/MetadataImpl.cpp
branches/REL_2/samltest/internal.h
Modified: branches/REL_2/saml/saml1/core/impl/AssertionsImpl.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/saml1/core/impl/AssertionsImpl.cpp?rev=681&r1=680&r2=681&view=diff
==============================================================================
--- branches/REL_2/saml/saml1/core/impl/AssertionsImpl.cpp (original)
+++ branches/REL_2/saml/saml1/core/impl/AssertionsImpl.cpp Mon Nov 21 21:46:19 2011
@@ -74,7 +74,7 @@
ConditionImpl(const ConditionImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
- IMPL_XMLOBJECT_CLONE(Condition);
+ IMPL_XMLOBJECT_CLONE_EX(Condition);
};
class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
@@ -100,10 +100,7 @@
}
}
- IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
- Condition* cloneCondition() const {
- return cloneAudienceRestrictionCondition();
- }
+ IMPL_XMLOBJECT_CLONE2(AudienceRestrictionCondition,Condition);
IMPL_TYPED_CHILDREN(Audience,m_children.end());
protected:
@@ -130,10 +127,7 @@
: AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
}
- IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
- Condition* cloneCondition() const {
- return cloneDoNotCacheCondition();
- }
+ IMPL_XMLOBJECT_CLONE2(DoNotCacheCondition,Condition);
};
class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
@@ -268,7 +262,7 @@
SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {
}
- IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
+ IMPL_XMLOBJECT_CLONE_EX(SubjectConfirmationData);
};
class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
@@ -383,7 +377,7 @@
StatementImpl(const StatementImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
- IMPL_XMLOBJECT_CLONE(Statement);
+ IMPL_XMLOBJECT_CLONE_EX(Statement);
};
class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
@@ -412,8 +406,19 @@
SubjectStatementImpl(const SubjectStatementImpl& src)
: AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
init();
+ }
+
+ void _clone(const SubjectStatementImpl& src) {
if (src.getSubject())
setSubject(src.getSubject()->cloneSubject());
+ }
+
+ Statement* cloneStatement() const {
+ return dynamic_cast<Statement*>(clone());
+ }
+
+ SubjectStatement* cloneSubjectStatement() const {
+ return dynamic_cast<SubjectStatement*>(clone());
}
IMPL_TYPED_CHILD(Subject);
@@ -521,6 +526,15 @@
class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
{
+ void init() {
+ m_AuthenticationMethod=nullptr;
+ m_AuthenticationInstant=nullptr;
+ m_SubjectLocality=nullptr;
+ m_children.push_back(nullptr);
+ m_pos_SubjectLocality=m_pos_Subject;
+ ++m_pos_SubjectLocality;
+ }
+
public:
virtual ~AuthenticationStatementImpl() {
XMLString::release(&m_AuthenticationMethod);
@@ -534,6 +548,10 @@
AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
init();
+ }
+
+ void _clone(const AuthenticationStatementImpl& src) {
+ SubjectStatementImpl::_clone(src);
setAuthenticationMethod(src.getAuthenticationMethod());
setAuthenticationInstant(src.getAuthenticationInstant());
if (src.getSubjectLocality())
@@ -546,22 +564,7 @@
}
}
- void init() {
- m_AuthenticationMethod=nullptr;
- m_AuthenticationInstant=nullptr;
- m_SubjectLocality=nullptr;
- m_children.push_back(nullptr);
- m_pos_SubjectLocality=m_pos_Subject;
[... 2125 lines stripped ...]
More information about the commits
mailing list