[cpp-xmltooling COMMIT] in /branches/REL_1: configure.ac xmltooling/XMLToolingConfig.cpp xmltooling/io/HTTPRequest.cp...

noreply at shibboleth.net noreply at shibboleth.net
Sun Dec 4 06:07:45 GMT 2011


Author: scantor
Date: Sun Dec  4 06:07:45 2011
New Revision: 933

URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=933&view=rev
Log:
More boostisms, add string tokenizer

Modified:
    branches/REL_1/configure.ac
    branches/REL_1/xmltooling/XMLToolingConfig.cpp
    branches/REL_1/xmltooling/io/HTTPRequest.cpp
    branches/REL_1/xmltooling/util/ParserPool.cpp
    branches/REL_1/xmltooling/util/ParserPool.h
    branches/REL_1/xmltooling/util/TemplateEngine.cpp
    branches/REL_1/xmltooling/util/TemplateEngine.h

Modified: branches/REL_1/configure.ac
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/configure.ac?rev=933&r1=932&r2=933&view=diff
==============================================================================
--- branches/REL_1/configure.ac (original)
+++ branches/REL_1/configure.ac Sun Dec  4 06:07:45 2011
@@ -100,6 +100,7 @@
 BOOST_LAMBDA
 BOOST_PTR_CONTAINER
 BOOST_STRING_ALGO
+BOOST_TOKENIZER
 
 # are covariant methods allowed?
 AC_LINK_IFELSE(

Modified: branches/REL_1/xmltooling/XMLToolingConfig.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/XMLToolingConfig.cpp?rev=933&r1=932&r2=933&view=diff
==============================================================================
--- branches/REL_1/xmltooling/XMLToolingConfig.cpp (original)
+++ branches/REL_1/xmltooling/XMLToolingConfig.cpp Sun Dec  4 06:07:45 2011
@@ -55,9 +55,9 @@
 #endif
 
 #include <stdexcept>
-#include <boost/algorithm/string.hpp>
 #include <boost/bind.hpp>
 #include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/tokenizer.hpp>
 
 #if defined(XMLTOOLING_LOG4SHIB)
 # include <log4shib/PropertyConfigurator.hh>
@@ -425,12 +425,12 @@
 
         // Load catalogs from path.
         if (!catalog_path.empty()) {
-            vector<string> catpaths;
-            split(catpaths, catalog_path, is_any_of(PATH_SEPARATOR_STR), algorithm::token_compress_on);
+            boost::tokenizer< char_separator<char> > catpaths(catalog_path, char_separator<char>(PATH_SEPARATOR_STR));
             for_each(
                 catpaths.begin(), catpaths.end(),
                 // Call loadCatalog with an inner call to s->c_str() on each entry.
-                boost::bind(static_cast<bool (ParserPool::*)(const char*)>(&ParserPool::loadCatalog), m_validatingPool, boost::bind(&string::c_str,_1))
+                boost::bind(static_cast<bool (ParserPool::*)(const char*)>(&ParserPool::loadCatalog),
+                    m_validatingPool, boost::bind(&string::c_str,_1))
                 );
         }
 

Modified: branches/REL_1/xmltooling/io/HTTPRequest.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/io/HTTPRequest.cpp?rev=933&r1=932&r2=933&view=diff
==============================================================================
--- branches/REL_1/xmltooling/io/HTTPRequest.cpp (original)
+++ branches/REL_1/xmltooling/io/HTTPRequest.cpp Sun Dec  4 06:07:45 2011
@@ -29,6 +29,7 @@
 
 #include <boost/algorithm/string.hpp>
 #include <boost/bind.hpp>
+#include <boost/tokenizer.hpp>
 
 using namespace xmltooling;
 using namespace boost;
@@ -70,8 +71,8 @@
 {
     if (m_cookieMap.empty()) {
         string cookies=getHeader("Cookie");
-        vector<string> nvpairs, nvpair;
-        split(nvpairs, cookies, is_any_of(";"), algorithm::token_compress_on);
+        vector<string> nvpair;
+        tokenizer< char_separator<char> > nvpairs(cookies, char_separator<char>(";"));
         for_each(nvpairs.begin(), nvpairs.end(), boost::bind(handle_cookie_fn, boost::ref(m_cookieMap), boost::ref(nvpair), _1));
     }
     map<string,string>::const_iterator lookup=m_cookieMap.find(name);

Modified: branches/REL_1/xmltooling/util/ParserPool.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/util/ParserPool.cpp?rev=933&r1=932&r2=933&view=diff
==============================================================================
--- branches/REL_1/xmltooling/util/ParserPool.cpp (original)
+++ branches/REL_1/xmltooling/util/ParserPool.cpp Sun Dec  4 06:07:45 2011
@@ -33,10 +33,12 @@
 #include "util/Threads.h"
 #include "util/XMLHelper.h"
 
+#include <sys/types.h>
+#include <sys/stat.h>
 #include <algorithm>
 #include <functional>
-#include <sys/types.h>
-#include <sys/stat.h>
+#include <boost/algorithm/string.hpp>
+#include <boost/bind.hpp>
 #include <xercesc/util/PlatformUtils.hpp>
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/sax/SAXException.hpp>
@@ -47,6 +49,7 @@
 using namespace xmltooling::logging;
 using namespace xmltooling;
 using namespace xercesc;
+using namespace boost;
 using namespace std;
 
 
@@ -108,8 +111,6 @@
         m_pool.top()->release();
         m_pool.pop();
     }
-    delete m_lock;
-    delete m_security;
 }
 
 DOMDocument* ParserPool::newDocument()
@@ -197,8 +198,7 @@
 }
 
 // Functor to double its argument separated by a character and append to a buffer
-template <class T> class doubleit
-{
+template <class T> class doubleit {
 public:
     doubleit(T& t, const typename T::value_type& s) : temp(t), sep(s) {}

[... 243 lines stripped ...]


More information about the commits mailing list