diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-08-02 20:41:55 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-08-02 21:03:09 (GMT) |
commit | d5ace22054203c7989691ae8b3fa4e4784d1b57e (patch) | |
tree | 64d400cdb10644967df183d0f202fcbf8160a773 /3rdParty/Boost/src/boost/asio/serial_port_service.hpp | |
parent | 6f26d9aa86f0909af13b23b1a925b8d492e74154 (diff) | |
download | swift-contrib-ks/boost1.47.zip swift-contrib-ks/boost1.47.tar.bz2 |
Add two extra Boost dependencies, upgrade to 1.47.0ks/boost1.47
Diffstat (limited to '3rdParty/Boost/src/boost/asio/serial_port_service.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/serial_port_service.hpp | 66 |
1 files changed, 50 insertions, 16 deletions
diff --git a/3rdParty/Boost/src/boost/asio/serial_port_service.hpp b/3rdParty/Boost/src/boost/asio/serial_port_service.hpp index 1a8a11b..0b6e794 100644 --- a/3rdParty/Boost/src/boost/asio/serial_port_service.hpp +++ b/3rdParty/Boost/src/boost/asio/serial_port_service.hpp @@ -63,11 +63,18 @@ public: typedef service_impl_type::implementation_type implementation_type; #endif - /// The native handle type. + /// (Deprecated: Use native_handle_type.) The native handle type. #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined native_type; #else - typedef service_impl_type::native_type native_type; + typedef service_impl_type::native_handle_type native_type; +#endif + + /// The native handle type. +#if defined(GENERATING_DOCUMENTATION) + typedef implementation_defined native_handle_type; +#else + typedef service_impl_type::native_handle_type native_handle_type; #endif /// Construct a new serial port service for the specified io_service. @@ -77,18 +84,29 @@ public: { } - /// Destroy all user-defined handler objects owned by the service. - void shutdown_service() - { - service_impl_.shutdown_service(); - } - /// Construct a new serial port implementation. void construct(implementation_type& impl) { service_impl_.construct(impl); } +#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Move-construct a new serial port implementation. + void move_construct(implementation_type& impl, + implementation_type& other_impl) + { + service_impl_.move_construct(impl, other_impl); + } + + /// Move-assign from another serial port implementation. + void move_assign(implementation_type& impl, + serial_port_service& other_service, + implementation_type& other_impl) + { + service_impl_.move_assign(impl, other_service.service_impl_, other_impl); + } +#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Destroy a serial port implementation. void destroy(implementation_type& impl) { @@ -104,9 +122,9 @@ public: /// Assign an existing native handle to a serial port. boost::system::error_code assign(implementation_type& impl, - const native_type& native_handle, boost::system::error_code& ec) + const native_handle_type& handle, boost::system::error_code& ec) { - return service_impl_.assign(impl, native_handle, ec); + return service_impl_.assign(impl, handle, ec); } /// Determine whether the handle is open. @@ -122,10 +140,16 @@ public: return service_impl_.close(impl, ec); } - /// Get the native handle implementation. + /// (Deprecated: Use native_handle().) Get the native handle implementation. native_type native(implementation_type& impl) { - return service_impl_.native(impl); + return service_impl_.native_handle(impl); + } + + /// Get the native handle implementation. + native_handle_type native_handle(implementation_type& impl) + { + return service_impl_.native_handle(impl); } /// Cancel all asynchronous operations associated with the handle. @@ -169,9 +193,11 @@ public: /// Start an asynchronous write. template <typename ConstBufferSequence, typename WriteHandler> void async_write_some(implementation_type& impl, - const ConstBufferSequence& buffers, WriteHandler handler) + const ConstBufferSequence& buffers, + BOOST_ASIO_MOVE_ARG(WriteHandler) handler) { - service_impl_.async_write_some(impl, buffers, handler); + service_impl_.async_write_some(impl, buffers, + BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); } /// Read some data from the stream. @@ -185,12 +211,20 @@ public: /// Start an asynchronous read. template <typename MutableBufferSequence, typename ReadHandler> void async_read_some(implementation_type& impl, - const MutableBufferSequence& buffers, ReadHandler handler) + const MutableBufferSequence& buffers, + BOOST_ASIO_MOVE_ARG(ReadHandler) handler) { - service_impl_.async_read_some(impl, buffers, handler); + service_impl_.async_read_some(impl, buffers, + BOOST_ASIO_MOVE_CAST(ReadHandler)(handler)); } private: + // Destroy all user-defined handler objects owned by the service. + void shutdown_service() + { + service_impl_.shutdown_service(); + } + // The platform-specific implementation. service_impl_type service_impl_; }; |