2 * Copyright 2001-2005 Internet2
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 * internal.h - internally visible classes
\r
21 #ifndef __xmltooling_internal_h__
\r
22 #define __xmltooling_internal_h__
\r
25 # define _CRT_SECURE_NO_DEPRECATE 1
\r
26 # define _CRT_NONSTDC_NO_DEPRECATE 1
\r
29 // eventually we might be able to support autoconf via cygwin...
\r
30 #if defined (_MSC_VER) || defined(__BORLANDC__)
\r
31 # include "config_win32.h"
\r
33 # include "config.h"
\r
37 #include "XMLToolingConfig.h"
\r
41 #define XMLTOOLING_LOGCAT "XMLTooling"
\r
45 class XMLToolingInternalConfig : public xmltooling::XMLToolingConfig
\r
48 XMLToolingInternalConfig() : m_lock(NULL) {}
\r
50 // global per-process setup and shutdown of runtime
\r
54 // global mutex available to library applications
\r
55 xmltooling::ILockable& lock();
\r
59 bool load_library(const char* path, void* context=NULL);
\r
60 bool log_config(const char* config=NULL);
\r
63 std::vector<void*> m_libhandles;
\r
65 //XSECProvider* m_xsec;
\r
66 //PlugManager m_plugMgr;
\r
69 // Template cleanup functors for use with for_each algorithm
\r
70 template<class T> struct cleanup
\r
72 void operator()(T* ptr) {delete ptr;}
\r
73 void operator()(const T* ptr) {delete const_cast<T*>(ptr);}
\r
76 template<class A,class B> struct cleanup_pair
\r
78 void operator()(const std::pair<A,B*>& p) {delete p.second;}
\r
82 #endif /* __xmltooling_internal_h__ */
\r