summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/serial_port_service.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/serial_port_service.hpp68
1 files changed, 51 insertions, 17 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..ed7306c 100644
--- a/3rdParty/Boost/src/boost/asio/serial_port_service.hpp
+++ b/3rdParty/Boost/src/boost/asio/serial_port_service.hpp
@@ -2,7 +2,7 @@
// serial_port_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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)
@@ -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_;
};