#include <ctime>
#include <limits.h>
+#include <boost/lexical_cast.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
using namespace opensaml::saml1;
ConditionImpl(const ConditionImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
- IMPL_XMLOBJECT_CLONE(Condition);
+ IMPL_XMLOBJECT_CLONE_EX(Condition);
};
class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
}
}
- IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
- Condition* cloneCondition() const {
- return cloneAudienceRestrictionCondition();
- }
+ IMPL_XMLOBJECT_CLONE2(AudienceRestrictionCondition,Condition);
IMPL_TYPED_CHILDREN(Audience,m_children.end());
protected:
: 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,
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_NotBefore=m_NotOnOrAfter=nullptr;
+ }
+
public:
virtual ~ConditionsImpl() {
delete m_NotBefore;
}
}
- void init() {
- m_NotBefore=m_NotOnOrAfter=nullptr;
- }
-
IMPL_XMLOBJECT_CLONE(Conditions);
IMPL_DATETIME_ATTRIB(NotBefore,0);
IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_Format=m_NameQualifier=nullptr;
+ }
+
public:
virtual ~NameIdentifierImpl() {
XMLString::release(&m_Format);
setNameQualifier(src.getNameQualifier());
}
- void init() {
- m_Format=m_NameQualifier=nullptr;
- }
-
IMPL_XMLOBJECT_CLONE(NameIdentifier);
IMPL_STRING_ATTRIB(Format);
IMPL_STRING_ATTRIB(NameQualifier);
SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {
}
- IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
+ IMPL_XMLOBJECT_CLONE_EX(SubjectConfirmationData);
};
class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_SubjectConfirmationData=nullptr;
+ m_KeyInfo=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_pos_SubjectConfirmationData=m_children.begin();
+ m_pos_KeyInfo=m_pos_SubjectConfirmationData;
+ ++m_pos_KeyInfo;
+ }
+
public:
virtual ~SubjectConfirmationImpl() {}
setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
if (src.getKeyInfo())
setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
- VectorOf(ConfirmationMethod) v=getConfirmationMethods();
for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
if (*i) {
- v.push_back((*i)->cloneConfirmationMethod());
+ getConfirmationMethods().push_back((*i)->cloneConfirmationMethod());
}
}
}
- void init() {
- m_SubjectConfirmationData=nullptr;
- m_KeyInfo=nullptr;
- m_children.push_back(nullptr);
- m_children.push_back(nullptr);
- m_pos_SubjectConfirmationData=m_children.begin();
- m_pos_KeyInfo=m_pos_SubjectConfirmationData;
- ++m_pos_KeyInfo;
- }
-
IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_NameIdentifier=nullptr;
+ m_SubjectConfirmation=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_pos_NameIdentifier=m_children.begin();
+ m_pos_SubjectConfirmation=m_pos_NameIdentifier;
+ ++m_pos_SubjectConfirmation;
+ }
+
public:
virtual ~SubjectImpl() {}
setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
}
- void init() {
- m_NameIdentifier=nullptr;
- m_SubjectConfirmation=nullptr;
- m_children.push_back(nullptr);
- m_children.push_back(nullptr);
- m_pos_NameIdentifier=m_children.begin();
- m_pos_SubjectConfirmation=m_pos_NameIdentifier;
- ++m_pos_SubjectConfirmation;
- }
-
IMPL_XMLOBJECT_CLONE(Subject);
IMPL_TYPED_CHILD(NameIdentifier);
IMPL_TYPED_CHILD(SubjectConfirmation);
StatementImpl(const StatementImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
- IMPL_XMLOBJECT_CLONE(Statement);
+ IMPL_XMLOBJECT_CLONE_EX(Statement);
};
class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
m_children.push_back(nullptr);
m_pos_Subject=m_children.begin();
}
+
protected:
SubjectStatementImpl() {
init();
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);
protected:
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_IPAddress=m_DNSAddress=nullptr;
+ }
+
public:
virtual ~SubjectLocalityImpl() {
XMLString::release(&m_IPAddress);
setDNSAddress(src.getDNSAddress());
}
- void init() {
- m_IPAddress=m_DNSAddress=nullptr;
- }
-
IMPL_XMLOBJECT_CLONE(SubjectLocality);
IMPL_STRING_ATTRIB(IPAddress);
IMPL_STRING_ATTRIB(DNSAddress);
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_AuthorityKind=nullptr;
+ m_Location=m_Binding=nullptr;
+ }
+
public:
virtual ~AuthorityBindingImpl() {
delete m_AuthorityKind;
setBinding(src.getBinding());
}
- void init() {
- m_AuthorityKind=nullptr;
- m_Location=m_Binding=nullptr;
- }
-
IMPL_XMLOBJECT_CLONE(AuthorityBinding);
IMPL_XMLOBJECT_ATTRIB(AuthorityKind,xmltooling::QName);
IMPL_STRING_ATTRIB(Location);
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);
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())
setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
- VectorOf(AuthorityBinding) v=getAuthorityBindings();
for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
if (*i) {
- v.push_back((*i)->cloneAuthorityBinding());
+ getAuthorityBindings().push_back((*i)->cloneAuthorityBinding());
}
}
}
- 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;
- }
-
- IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
- SubjectStatement* cloneSubjectStatement() const {
- return cloneAuthenticationStatement();
- }
- Statement* cloneStatement() const {
- return cloneAuthenticationStatement();
- }
+ IMPL_XMLOBJECT_CLONE_EX(AuthenticationStatement);
IMPL_STRING_ATTRIB(AuthenticationMethod);
IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
IMPL_TYPED_CHILD(SubjectLocality);
: AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(nullptr) {
}
- ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
+ ActionImpl(const ActionImpl& src)
+ : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_Namespace(nullptr) {
setNamespace(src.getNamespace());
}
class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
: public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
{
+ void init() {
+ m_Resource=nullptr;
+ m_Decision=nullptr;
+ m_Evidence=nullptr;
+ m_children.push_back(nullptr);
+ m_pos_Evidence=m_pos_Subject;
+ ++m_pos_Evidence;
+ }
+
public:
virtual ~AuthorizationDecisionStatementImpl() {
XMLString::release(&m_Resource);
AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
: AbstractXMLObject(src), SubjectStatementImpl(src) {
init();
+ }
+
+ void _clone(const AuthorizationDecisionStatementImpl& src) {
+ SubjectStatementImpl::_clone(src);
setResource(src.getResource());
setDecision(src.getDecision());
if (src.getEvidence())
setEvidence(src.getEvidence()->cloneEvidence());
- VectorOf(Action) v=getActions();
for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
if (*i) {
- v.push_back((*i)->cloneAction());
+ getActions().push_back((*i)->cloneAction());
}
}
}
- void init() {
- m_Resource=nullptr;
- m_Decision=nullptr;
- m_Evidence=nullptr;
- m_children.push_back(nullptr);
- m_pos_Evidence=m_pos_Subject;
- ++m_pos_Evidence;
- }
-
- IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
- SubjectStatement* cloneSubjectStatement() const {
- return cloneAuthorizationDecisionStatement();
- }
- Statement* cloneStatement() const {
- return cloneAuthorizationDecisionStatement();
- }
+ IMPL_XMLOBJECT_CLONE_EX(AuthorizationDecisionStatement);
IMPL_STRING_ATTRIB(Resource);
IMPL_STRING_ATTRIB(Decision);
IMPL_TYPED_CHILD(Evidence);
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_AttributeName=m_AttributeNamespace=nullptr;
+ }
+
public:
virtual ~AttributeDesignatorImpl() {
XMLString::release(&m_AttributeName);
setAttributeNamespace(src.getAttributeNamespace());
}
- void init() {
- m_AttributeName=m_AttributeNamespace=nullptr;
- }
-
IMPL_XMLOBJECT_CLONE(AttributeDesignator);
IMPL_STRING_ATTRIB(AttributeName);
IMPL_STRING_ATTRIB(AttributeNamespace);
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
+ void init() {
+ m_AttributeName=m_AttributeNamespace=nullptr;
+ }
public:
virtual ~AttributeImpl() {
XMLString::release(&m_AttributeName);
init();
setAttributeName(src.getAttributeName());
setAttributeNamespace(src.getAttributeNamespace());
- VectorOf(XMLObject) v=getAttributeValues();
for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
if (*i) {
- v.push_back((*i)->clone());
+ getAttributeValues().push_back((*i)->clone());
}
}
}
- void init() {
- m_AttributeName=m_AttributeNamespace=nullptr;
- }
-
- IMPL_XMLOBJECT_CLONE(Attribute);
- AttributeDesignator* cloneAttributeDesignator() const {
- return cloneAttribute();
- }
+ IMPL_XMLOBJECT_CLONE2(Attribute,AttributeDesignator);
IMPL_STRING_ATTRIB(AttributeName);
IMPL_STRING_ATTRIB(AttributeNamespace);
IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
AttributeValueImpl(const AttributeValueImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
- IMPL_XMLOBJECT_CLONE(AttributeValue);
+ IMPL_XMLOBJECT_CLONE_EX(AttributeValue);
};
class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
}
- AttributeStatementImpl(const AttributeStatementImpl& src)
- : AbstractXMLObject(src), SubjectStatementImpl(src) {
- VectorOf(Attribute) v=getAttributes();
+ AttributeStatementImpl(const AttributeStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
+ }
+
+ void _clone(const AttributeStatementImpl& src) {
+ SubjectStatementImpl::_clone(src);
for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
if (*i) {
- v.push_back((*i)->cloneAttribute());
+ getAttributes().push_back((*i)->cloneAttribute());
}
}
}
- IMPL_XMLOBJECT_CLONE(AttributeStatement);
- SubjectStatement* cloneSubjectStatement() const {
- return cloneAttributeStatement();
- }
- Statement* cloneStatement() const {
- return cloneAttributeStatement();
- }
+ IMPL_XMLOBJECT_CLONE_EX(AttributeStatement);
IMPL_TYPED_CHILDREN(Attribute, m_children.end());
protected:
continue;
}
- getUnknownXMLObjects().push_back((*i)->clone());
+ if (*i) {
+ getUnknownXMLObjects().push_back((*i)->clone());
+ }
}
}
}
m_pos_Signature=m_pos_Advice;
++m_pos_Signature;
}
+
public:
virtual ~AssertionImpl() {
XMLString::release(&m_MinorVersion);