X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Futil%2FParserPool.h;h=93c2af4085c62df772b6e58515942d9b8841586a;hb=fb0b932235484e41580e8e8ae7b7e36b02168414;hp=004f7c77feb0ea824fa2e3f87f1711855e427542;hpb=04302f1b6d2b753b00ff2bb99b20a89488f2f13d;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/util/ParserPool.h b/xmltooling/util/ParserPool.h index 004f7c7..93c2af4 100644 --- a/xmltooling/util/ParserPool.h +++ b/xmltooling/util/ParserPool.h @@ -1,17 +1,21 @@ -/* - * Copyright 2001-2009 Internet2 +/** + * Licensed to the University Corporation for Advanced Internet + * Development, Inc. (UCAID) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for + * additional information regarding copyright ownership. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * UCAID licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the + * License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. */ /** @@ -26,6 +30,7 @@ #include #include +#include #include #include #include @@ -110,6 +115,17 @@ namespace xmltooling { * @param pathname path to a catalog file * @return true iff the catalog was successfully processed */ + bool loadCatalog(const char* pathname); + + /** + * Load an OASIS catalog file to map schema namespace URIs to filenames. + * + * This does not provide real catalog support; only the <uri> 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 XMLCh* pathname); /** @@ -161,8 +177,8 @@ namespace xmltooling { #else std::stack m_pool; #endif - Mutex* m_lock; - xercesc::SecurityManager* m_security; + std::auto_ptr m_lock; + std::auto_ptr m_security; }; /** @@ -178,7 +194,7 @@ namespace xmltooling { * @param is reference to an input stream * @param systemId optional system identifier to attach to the stream */ - StreamInputSource(std::istream& is, const char* systemId=NULL); + StreamInputSource(std::istream& is, const char* systemId=nullptr); /// @cond off xercesc::BinInputStream* makeStream() const; /// @endcond @@ -227,7 +243,7 @@ namespace xmltooling { * @param systemId optional system identifier to attach to the source * @param cacheTag optional pointer to string used for cache management */ - URLInputSource(const XMLCh* url, const char* systemId=NULL, std::string* cacheTag=NULL); + URLInputSource(const XMLCh* url, const char* systemId=nullptr, std::string* cacheTag=nullptr); /** * Constructor taking a DOM element supporting the following content: @@ -245,7 +261,7 @@ namespace xmltooling { * @param systemId optional system identifier to attach to the source * @param cacheTag optional pointer to string used for cache management */ - URLInputSource(const xercesc::DOMElement* e, const char* systemId=NULL, std::string* cacheTag=NULL); + URLInputSource(const xercesc::DOMElement* e, const char* systemId=nullptr, std::string* cacheTag=nullptr); /// @cond off virtual xercesc::BinInputStream* makeStream() const;