Add accessor for feature bitmask.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sat, 18 Sep 2010 20:14:21 +0000 (20:14 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sat, 18 Sep 2010 20:14:21 +0000 (20:14 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3322 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/SPConfig.cpp
shibsp/SPConfig.h

index de35b4d..c62c668 100644 (file)
@@ -121,7 +121,11 @@ void SPConfig::setFeatures(unsigned long enabled)
     m_features = enabled;
 }
 
-bool SPConfig::isEnabled(components_t feature)
+unsigned long SPConfig::getFeatures() const {
+    return m_features;
+}
+
+bool SPConfig::isEnabled(components_t feature) const
 {
     return (m_features & feature)>0;
 }
index 918b102..73a70a1 100644 (file)
@@ -108,13 +108,21 @@ namespace shibsp {
          */
         void setFeatures(unsigned long enabled);
 
+
+        /**
+         * Gets the bitmask of subsystems being activated.
+         *
+         * @return bitmask of component constants
+         */
+        unsigned long getFeatures() const;
+
         /**
          * Test whether a subsystem is enabled.
          *
          * @param feature   subsystem/component to test
          * @return true iff feature is enabled
          */
-        bool isEnabled(components_t feature);
+        bool isEnabled(components_t feature) const;
 
         /**
          * Initializes library