Add assertion indicator to base class.
authorScott Cantor <cantor.2@osu.edu>
Mon, 22 Jan 2007 06:14:20 +0000 (06:14 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 22 Jan 2007 06:14:20 +0000 (06:14 +0000)
saml/RootObject.h
saml/saml1/core/Assertions.h
saml/saml2/core/Assertions.h

index 5ce98ec..45103d3 100644 (file)
@@ -38,6 +38,15 @@ namespace opensaml {
         virtual ~RootObject() {}
 
         /**
+         * Indicates whether the object is an assertion.
+         * 
+         * @return true iff the object is an assertion 
+         */
+        virtual bool isAssertion() const {
+            return false;
+        }
+
+        /**
          * Returns the unique SAML ID of the object.
          *
          * @return the unique SAML ID
index 56afa7c..85e821f 100644 (file)
@@ -216,6 +216,9 @@ namespace opensaml {
         END_XMLOBJECT;
 
         BEGIN_XMLOBJECT(SAML_API,Assertion,RootObject,SAML 1.x Assertion element);
+            bool isAssertion() const {
+                return true;
+            }
             DECL_INTEGER_ATTRIB(MinorVersion,MINORVERSION);
             DECL_STRING_ATTRIB(AssertionID,ASSERTIONID);
             DECL_STRING_ATTRIB(Issuer,ISSUER);
index ba4b816..80e526c 100644 (file)
@@ -321,6 +321,9 @@ namespace opensaml {
         };
 
         BEGIN_XMLOBJECT(SAML_API,Assertion,saml2::RootObject,SAML 2.0 Assertion element);
+            bool isAssertion() const {
+                return true;
+            }
             DECL_INHERITED_STRING_ATTRIB(Version,VER);
             DECL_INHERITED_STRING_ATTRIB(ID,ID);
             DECL_INHERITED_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT);