Reducing header overuse, non-inlining selected methods (CPPOST-35).
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Tue, 13 Oct 2009 02:41:11 +0000 (02:41 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Tue, 13 Oct 2009 02:41:11 +0000 (02:41 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@660 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/XMLToolingConfig.cpp
xmltooling/XMLToolingConfig.h

index e3710aa..9a43921 100644 (file)
@@ -17,7 +17,7 @@
 /**
  * XMLToolingConfig.cpp
  *
- * Library configuration
+ * Library configuration.
  */
 
 #include "internal.h"
@@ -26,8 +26,6 @@
 #include "XMLToolingConfig.h"
 #include "encryption/Encryption.h"
 #include "encryption/Encrypter.h"
-#include "io/HTTPRequest.h"
-#include "io/HTTPResponse.h"
 #include "impl/UnknownElement.h"
 #include "security/TrustEngine.h"
 #include "security/OpenSSLCryptoX509CRL.h"
@@ -36,7 +34,6 @@
 #include "signature/KeyInfo.h"
 #include "signature/Signature.h"
 #include "soap/SOAP.h"
-#include "soap/SOAPTransport.h"
 #include "util/NDC.h"
 #include "util/PathResolver.h"
 #include "util/ReplayCache.h"
@@ -44,7 +41,6 @@
 #include "util/TemplateEngine.h"
 #include "util/Threads.h"
 #include "util/URLEncoder.h"
-#include "util/XMLConstants.h"
 #include "validation/ValidatorSuite.h"
 
 #ifdef HAVE_DLFCN_H
@@ -139,6 +135,20 @@ XMLToolingInternalConfig& XMLToolingInternalConfig::getInternalConfig()
     return g_config;
 }
 
+#ifndef XMLTOOLING_NO_XMLSEC
+XMLToolingConfig::XMLToolingConfig()
+    : m_keyInfoResolver(NULL), m_replayCache(NULL), m_pathResolver(NULL), m_templateEngine(NULL), m_urlEncoder(NULL), clock_skew_secs(180)
+#else
+XMLToolingConfig::XMLToolingConfig()
+    : m_pathResolver(NULL), m_templateEngine(NULL), m_urlEncoder(NULL), clock_skew_secs(180)
+#endif
+{
+}
+
+XMLToolingConfig::~XMLToolingConfig()
+{
+}
+
 bool XMLToolingInternalConfig::log_config(const char* config)
 {
     try {
index 8afee3d..9333bce 100644 (file)
@@ -17,7 +17,7 @@
 /**
  * @file xmltooling/XMLToolingConfig.h
  * 
- * Library configuration 
+ * Library configuration.
  */
 
 #ifndef __xmltooling_config_h__
 #include <xmltooling/Lockable.h>
 #include <xmltooling/PluginManager.h>
 #include <xmltooling/soap/SOAPTransport.h>
-#include <xmltooling/util/ParserPool.h>
 
-#ifndef XMLTOOLING_NO_XMLSEC
-namespace xmltooling {
-    class XMLTOOL_API CredentialResolver;
-    class XMLTOOL_API KeyInfoResolver;
-    class XMLTOOL_API TrustEngine;
-    class XMLTOOL_API XSECCryptoX509CRL;
-};
-#endif
+#include <string>
+#include <xercesc/dom/DOM.hpp>
 
 #if defined (_MSC_VER)
     #pragma warning( push )
@@ -44,6 +37,7 @@ namespace xmltooling {
 
 namespace xmltooling {
     
+    class XMLTOOL_API ParserPool;
     class XMLTOOL_API PathResolver;
     class XMLTOOL_API TemplateEngine;
     class XMLTOOL_API URLEncoder;
@@ -51,6 +45,12 @@ namespace xmltooling {
     class XMLTOOL_API ReplayCache;
     class XMLTOOL_API StorageService;
 #endif
+#ifndef XMLTOOLING_NO_XMLSEC
+    class XMLTOOL_API CredentialResolver;
+    class XMLTOOL_API KeyInfoResolver;
+    class XMLTOOL_API TrustEngine;
+    class XMLTOOL_API XSECCryptoX509CRL;
+#endif
 
     /**
      * Singleton object that manages library startup/shutdown.configuration.
@@ -59,21 +59,18 @@ namespace xmltooling {
      * obtain a global system lock, but the actual configuration itself is not
      * synchronized.
      */
-    class XMLTOOL_API XMLToolingConfig : public Lockable
+    class XMLTOOL_API XMLToolingConfig : public virtual Lockable
     {
         MAKE_NONCOPYABLE(XMLToolingConfig);
     protected:
-#ifndef XMLTOOLING_NO_XMLSEC
-        XMLToolingConfig() : m_keyInfoResolver(NULL), m_replayCache(NULL),
-            m_pathResolver(NULL), m_templateEngine(NULL), m_urlEncoder(NULL), clock_skew_secs(180) {}
+        XMLToolingConfig();
 
+#ifndef XMLTOOLING_NO_XMLSEC
         /** Global KeyInfoResolver instance. */
         KeyInfoResolver* m_keyInfoResolver;
 
         /** Global ReplayCache instance. */
         ReplayCache* m_replayCache;
-#else
-        XMLToolingConfig() : m_pathResolver(NULL), m_templateEngine(NULL), m_urlEncoder(NULL), clock_skew_secs(180) {}
 #endif
 
         /** Global PathResolver instance. */
@@ -86,7 +83,7 @@ namespace xmltooling {
         URLEncoder* m_urlEncoder;
 
     public:
-        virtual ~XMLToolingConfig() {}
+        virtual ~XMLToolingConfig();
 
         /**
          * Returns the global configuration object for the library.