https://issues.shibboleth.net/jira/browse/CPPXT-90
[shibboleth/cpp-xmltooling.git] / xmltooling / util / ParserPool.h
index 8dee873..1fd127d 100644 (file)
@@ -30,6 +30,7 @@
 #include <xmltooling/unicode.h>
 
 #include <map>
+#include <memory>
 #include <stack>
 #include <string>
 #include <istream>
@@ -106,15 +107,28 @@ namespace xmltooling {
         xercesc::DOMDocument* parse(std::istream& is);
 
         /**
+         * Load OASIS catalog files to map schema namespace URIs to filenames.
+         *
+         * <p>This does not provide real catalog support; only the &lt;uri&gt; element
+         * is supported to map from a namespace URI to a relative path or file:// URI.
+         *
+         * <p>Multiple files can be specified using a platform-specific path delimiter.
+         *
+         * @param pathname  path to one or more catalog files
+         * @return true iff the catalogs were successfully processed
+         */
+        bool loadCatalogs(const char* pathnames);
+
+        /**
          * Load an OASIS catalog file to map schema namespace URIs to filenames.
          *
-         * This does not provide real catalog support; only the &lt;uri&gt; element
+         * <p>This does not provide real catalog support; only the &lt;uri&gt; element
          * is supported to map from a namespace URI to a relative path or file:// URI.
          *
          * @param pathname  path to a catalog file
          * @return true iff the catalog was successfully processed
          */
-        bool loadCatalog(const char* pathname);
+        bool loadCatalog(const char* pathnames);
 
         /**
          * Load an OASIS catalog file to map schema namespace URIs to filenames.
@@ -176,8 +190,8 @@ namespace xmltooling {
 #else
         std::stack<xercesc::DOMBuilder*> m_pool;
 #endif
-        Mutex* m_lock;
-        xercesc::SecurityManager* m_security;
+        std::auto_ptr<Mutex> m_lock;
+        std::auto_ptr<xercesc::SecurityManager> m_security;
     };
 
     /**