Boost logo

Boost-Commit :

From: lists.drrngrvy_at_[hidden]
Date: 2008-05-21 12:16:19


Author: drrngrvy
Date: 2008-05-21 12:16:18 EDT (Wed, 21 May 2008)
New Revision: 45611
URL: http://svn.boost.org/trac/boost/changeset/45611

Log:
* More refactoring: Moving things imported from Boost.Asio into the import folder.
* Adding/fixing a couple of hooks for the *option* of building a library out of the headers.

Added:
   sandbox/SOC/2007/cgi/trunk/boost/cgi/import/basic_io_object.hpp
      - copied, changed from r43960, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_io_object.hpp
Removed:
   sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_io_object.hpp
Text files modified:
   sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp | 3 -
   sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp | 4 +
   sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp | 1
   sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp | 1
   sandbox/SOC/2007/cgi/trunk/boost/cgi/import/basic_io_object.hpp | 73 ++++-----------------------------------
   5 files changed, 15 insertions(+), 67 deletions(-)

Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_io_object.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_io_object.hpp 2008-05-21 12:16:18 EDT (Wed, 21 May 2008)
+++ (empty file)
@@ -1,78 +0,0 @@
-// -- basic_io_object.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_IO_OBJECT_HPP_INCLUDED__
-#define CGI_BASIC_IO_OBJECT_HPP_INCLUDED__
-
-#include <boost/noncopyable.hpp>
-#include <boost/asio/io_service.hpp>
-
-namespace cgi {
-
- template<typename Service>
- class basic_io_object
- : private boost::noncopyable
- {
- public:
- typedef Service service_type;
-
- ::cgi::io_service&
- io_service()
- {
- return service.io_service();
- }
-
- private:
- typedef typename Service::implementation_type impl_type;
- typedef typename Service::implementation_type implementation_type;
-
- protected:
- explicit basic_io_object(::cgi::io_service& ios)
- : service(boost::asio::use_service<Service>(ios))
- {
- service.construct(implementation);
- }
-
- ~basic_io_object()
- {
- service.destroy(implementation);
- }
-
- implementation_type implementation;
- service_type& service;
- };
-
- /*
- template<>
- class basic_io_object< ::cgi::request>
- : private boost::noncopyable
- {
- public:
- typedef Service service_type;
- typedef typename Service::impl_type impl_type;
-
- protected:
- explicit basic_io_object()
- {
- service.construct(impl);
- }
-
- ~basic_io_object()
- {
- service.destroy(impl);
- }
-
- impl_type impl;
- service_type service;
- boost::asio::io_service io_service;
- };
- */
-
-} // namespace cgi
-
-#endif // CGI_BASIC_IO_OBJECT_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp 2008-05-21 12:16:18 EDT (Wed, 21 May 2008)
@@ -27,10 +27,8 @@
 // **FIXME** Half of these are probably useless
 #include "boost/cgi/is_async.hpp"
 #include "boost/cgi/common/map.hpp"
-//#include "boost/cgi/request_base.hpp"
 #include "boost/cgi/connection_base.hpp"
 #include "boost/cgi/request_service.hpp"
-#include "boost/cgi/basic_io_object.hpp"
 #include "boost/cgi/common/role_type.hpp"
 #include "boost/cgi/http/status_code.hpp"
 #include "boost/cgi/basic_request_fwd.hpp"
@@ -38,6 +36,7 @@
 #include "boost/cgi/common/status_type.hpp"
 #include "boost/cgi/common/source_enums.hpp"
 #include "boost/cgi/basic_sync_io_object.hpp"
+#include "boost/cgi/import/basic_io_object.hpp"
 #include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/common/basic_protocol_service_fwd.hpp"
 

Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp 2008-05-21 12:16:18 EDT (Wed, 21 May 2008)
@@ -240,6 +240,8 @@
 
 #include "boost/cgi/detail/pop_options.hpp"
 
-#include "boost/cgi/impl/response.ipp"
+#if !defined(BOOST_CGI_BUILD_LIB)
+# include "boost/cgi/impl/response.ipp"
+#endif
 
 #endif // CGI_RESPONSE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp 2008-05-21 12:16:18 EDT (Wed, 21 May 2008)
@@ -9,6 +9,7 @@
 #ifndef CGI_DETAIL_FORM_PARSER_IPP_INCLUDED__
 #define CGI_DETAIL_FORM_PARSER_IPP_INCLUDED__
 
+#include "boost/cgi/error.hpp"
 #include "boost/cgi/basic_client.hpp"
 #include "boost/cgi/common/form_parser.hpp"
 #include "boost/cgi/detail/url_decode.hpp"

Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp 2008-05-21 12:16:18 EDT (Wed, 21 May 2008)
@@ -23,6 +23,7 @@
 #include "boost/cgi/import/buffer.hpp"
 #include "boost/cgi/common/cookie.hpp"
 #include "boost/cgi/common/header.hpp"
+#include "boost/cgi/common/response.hpp"
 #include "boost/cgi/http/status_code.hpp"
 #include "boost/cgi/import/streambuf.hpp"
 #include "boost/cgi/basic_request_fwd.hpp"

Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/import/basic_io_object.hpp (from r43960, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_io_object.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_io_object.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/import/basic_io_object.hpp 2008-05-21 12:16:18 EDT (Wed, 21 May 2008)
@@ -1,4 +1,4 @@
-// -- basic_io_object.hpp --
+// -- import/basic_io_object.hpp --
 //
 // Copyright (c) Darren Garvey 2007.
 // Distributed under the Boost Software License, Version 1.0.
@@ -6,73 +6,18 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 ////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_IO_OBJECT_HPP_INCLUDED__
-#define CGI_BASIC_IO_OBJECT_HPP_INCLUDED__
+#ifndef CGI_IMPORT_BASIC_IO_OBJECT_HPP_INCLUDED__
+#define CGI_IMPORT_BASIC_IO_OBJECT_HPP_INCLUDED__
 
-#include <boost/noncopyable.hpp>
-#include <boost/asio/io_service.hpp>
+#include <boost/asio/basic_io_object.hpp>
 
 namespace cgi {
+ namespace common {
 
- template<typename Service>
- class basic_io_object
- : private boost::noncopyable
- {
- public:
- typedef Service service_type;
-
- ::cgi::io_service&
- io_service()
- {
- return service.io_service();
- }
-
- private:
- typedef typename Service::implementation_type impl_type;
- typedef typename Service::implementation_type implementation_type;
-
- protected:
- explicit basic_io_object(::cgi::io_service& ios)
- : service(boost::asio::use_service<Service>(ios))
- {
- service.construct(implementation);
- }
-
- ~basic_io_object()
- {
- service.destroy(implementation);
- }
-
- implementation_type implementation;
- service_type& service;
- };
-
- /*
- template<>
- class basic_io_object< ::cgi::request>
- : private boost::noncopyable
- {
- public:
- typedef Service service_type;
- typedef typename Service::impl_type impl_type;
-
- protected:
- explicit basic_io_object()
- {
- service.construct(impl);
- }
-
- ~basic_io_object()
- {
- service.destroy(impl);
- }
-
- impl_type impl;
- service_type service;
- boost::asio::io_service io_service;
- };
- */
+ using boost::asio::basic_io_object;
 
+ } // namespace common
 } // namespace cgi
 
-#endif // CGI_BASIC_IO_OBJECT_HPP_INCLUDED__
+#endif // CGI_IMPORT_BASIC_IO_OBJECT_HPP_INCLUDED__
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk