From 49f6859c66a7ab7c4ec84ee7929525ae31c6b9e4 Mon Sep 17 00:00:00 2001 From: Bari Bookout Date: Fri, 19 Oct 2018 16:57:26 -0700 Subject: [PATCH] delete --- .../align/detail/assume_aligned_msvc.hpp | 19 - .../boost/asio/buffered_read_stream_fwd.hpp | 27 - .../BH/include/boost/asio/buffered_stream.hpp | 280 --- .../boost/asio/buffered_stream_fwd.hpp | 27 - .../boost/asio/buffered_write_stream.hpp | 251 --- .../boost/asio/buffered_write_stream_fwd.hpp | 27 - .../include/boost/asio/buffers_iterator.hpp | 523 ----- .../boost/asio/completion_condition.hpp | 220 -- .../3.5.1/BH/include/boost/asio/connect.hpp | 1061 ---------- .../3.5.1/BH/include/boost/asio/coroutine.hpp | 330 --- .../boost/asio/datagram_socket_service.hpp | 468 ----- .../BH/include/boost/asio/deadline_timer.hpp | 40 - .../boost/asio/deadline_timer_service.hpp | 175 -- .../3.5.1/BH/include/boost/asio/defer.hpp | 109 - .../3.5.1/BH/include/boost/asio/dispatch.hpp | 110 - .../3.5.1/BH/include/boost/asio/error.hpp | 361 ---- .../include/boost/asio/execution_context.hpp | 413 ---- .../3.5.1/BH/include/boost/asio/executor.hpp | 343 ---- .../boost/asio/executor_work_guard.hpp | 171 -- .../include/boost/asio/handler_alloc_hook.hpp | 83 - .../boost/asio/handler_continuation_hook.hpp | 56 - .../boost/asio/handler_invoke_hook.hpp | 87 - .../BH/include/boost/asio/handler_type.hpp | 52 - .../boost/asio/high_resolution_timer.hpp | 46 - .../BH/include/boost/asio/io_context.hpp | 878 -------- .../include/boost/asio/io_context_strand.hpp | 384 ---- .../BH/include/boost/asio/io_service.hpp | 35 - .../include/boost/asio/io_service_strand.hpp | 20 - .../BH/include/boost/asio/is_executor.hpp | 48 - .../include/boost/asio/is_read_buffered.hpp | 61 - .../include/boost/asio/is_write_buffered.hpp | 61 - .../BH/include/boost/asio/packaged_task.hpp | 128 -- .../BH/include/boost/asio/placeholders.hpp | 153 -- .../3.5.1/BH/include/boost/asio/post.hpp | 109 - .../include/boost/asio/raw_socket_service.hpp | 468 ----- .../3.5.1/BH/include/boost/asio/read.hpp | 949 --------- .../3.5.1/BH/include/boost/asio/read_at.hpp | 673 ------ .../BH/include/boost/asio/read_until.hpp | 1826 ----------------- .../boost/asio/seq_packet_socket_service.hpp | 418 ---- .../BH/include/boost/asio/serial_port.hpp | 771 ------- .../include/boost/asio/serial_port_base.hpp | 169 -- .../boost/asio/serial_port_service.hpp | 251 --- .../BH/include/boost/asio/signal_set.hpp | 449 ---- .../include/boost/asio/signal_set_service.hpp | 144 -- 44 files changed, 13274 deletions(-) delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/align/detail/assume_aligned_msvc.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_read_stream_fwd.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream_fwd.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream_fwd.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffers_iterator.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/completion_condition.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/connect.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/coroutine.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/datagram_socket_service.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer_service.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/defer.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/dispatch.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/error.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/execution_context.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor_work_guard.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_alloc_hook.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_continuation_hook.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_invoke_hook.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_type.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/high_resolution_timer.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context_strand.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service_strand.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_executor.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_read_buffered.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_write_buffered.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/packaged_task.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/placeholders.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/post.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/raw_socket_service.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_at.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_until.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/seq_packet_socket_service.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_base.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_service.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set.hpp delete mode 100644 NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set_service.hpp diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/align/detail/assume_aligned_msvc.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/align/detail/assume_aligned_msvc.hpp deleted file mode 100644 index 75ac7e12..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/align/detail/assume_aligned_msvc.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2015 NumScale SAS -Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI - -Copyright 2015 Glen Joseph Fernandes -(glenjofe@gmail.com) - -Distributed under the Boost Software License, Version 1.0. -(http://www.boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP -#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP - -#include - -#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) \ -__assume((reinterpret_cast(ptr) & ((alignment) - 1)) == 0) - -#endif diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_read_stream_fwd.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_read_stream_fwd.hpp deleted file mode 100644 index 3ffac044..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_read_stream_fwd.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// -// buffered_read_stream_fwd.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_BUFFERED_READ_STREAM_FWD_HPP -#define BOOST_ASIO_BUFFERED_READ_STREAM_FWD_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -namespace boost { -namespace asio { - -template -class buffered_read_stream; - -} // namespace asio -} // namespace boost - -#endif // BOOST_ASIO_BUFFERED_READ_STREAM_FWD_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream.hpp deleted file mode 100644 index a468370f..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream.hpp +++ /dev/null @@ -1,280 +0,0 @@ -// -// buffered_stream.hpp -// ~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_BUFFERED_STREAM_HPP -#define BOOST_ASIO_BUFFERED_STREAM_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Adds buffering to the read- and write-related operations of a stream. -/** - * The buffered_stream class template can be used to add buffering to the - * synchronous and asynchronous read and write operations of a stream. - * - * @par Thread Safety - * @e Distinct @e objects: Safe.@n - * @e Shared @e objects: Unsafe. - * - * @par Concepts: - * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream. - */ -template -class buffered_stream - : private noncopyable -{ -public: - /// The type of the next layer. - typedef typename remove_reference::type next_layer_type; - - /// The type of the lowest layer. - typedef typename next_layer_type::lowest_layer_type lowest_layer_type; - - /// The type of the executor associated with the object. - typedef typename lowest_layer_type::executor_type executor_type; - - /// Construct, passing the specified argument to initialise the next layer. - template - explicit buffered_stream(Arg& a) - : inner_stream_impl_(a), - stream_impl_(inner_stream_impl_) - { - } - - /// Construct, passing the specified argument to initialise the next layer. - template - explicit buffered_stream(Arg& a, std::size_t read_buffer_size, - std::size_t write_buffer_size) - : inner_stream_impl_(a, write_buffer_size), - stream_impl_(inner_stream_impl_, read_buffer_size) - { - } - - /// Get a reference to the next layer. - next_layer_type& next_layer() - { - return stream_impl_.next_layer().next_layer(); - } - - /// Get a reference to the lowest layer. - lowest_layer_type& lowest_layer() - { - return stream_impl_.lowest_layer(); - } - - /// Get a const reference to the lowest layer. - const lowest_layer_type& lowest_layer() const - { - return stream_impl_.lowest_layer(); - } - - /// Get the executor associated with the object. - executor_type get_executor() BOOST_ASIO_NOEXCEPT - { - return stream_impl_.lowest_layer().get_executor(); - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - boost::asio::io_context& get_io_context() - { - return stream_impl_.get_io_context(); - } - - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - boost::asio::io_context& get_io_service() - { - return stream_impl_.get_io_service(); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Close the stream. - void close() - { - stream_impl_.close(); - } - - /// Close the stream. - BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec) - { - stream_impl_.close(ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Flush all data from the buffer to the next layer. Returns the number of - /// bytes written to the next layer on the last write operation. Throws an - /// exception on failure. - std::size_t flush() - { - return stream_impl_.next_layer().flush(); - } - - /// Flush all data from the buffer to the next layer. Returns the number of - /// bytes written to the next layer on the last write operation, or 0 if an - /// error occurred. - std::size_t flush(boost::system::error_code& ec) - { - return stream_impl_.next_layer().flush(ec); - } - - /// Start an asynchronous flush. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_flush(BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - return stream_impl_.next_layer().async_flush( - BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); - } - - /// Write the given data to the stream. Returns the number of bytes written. - /// Throws an exception on failure. - template - std::size_t write_some(const ConstBufferSequence& buffers) - { - return stream_impl_.write_some(buffers); - } - - /// Write the given data to the stream. Returns the number of bytes written, - /// or 0 if an error occurred. - template - std::size_t write_some(const ConstBufferSequence& buffers, - boost::system::error_code& ec) - { - return stream_impl_.write_some(buffers, ec); - } - - /// Start an asynchronous write. The data being written must be valid for the - /// lifetime of the asynchronous operation. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_write_some(const ConstBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - return stream_impl_.async_write_some(buffers, - BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); - } - - /// Fill the buffer with some data. Returns the number of bytes placed in the - /// buffer as a result of the operation. Throws an exception on failure. - std::size_t fill() - { - return stream_impl_.fill(); - } - - /// Fill the buffer with some data. Returns the number of bytes placed in the - /// buffer as a result of the operation, or 0 if an error occurred. - std::size_t fill(boost::system::error_code& ec) - { - return stream_impl_.fill(ec); - } - - /// Start an asynchronous fill. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_fill(BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - return stream_impl_.async_fill(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler)); - } - - /// Read some data from the stream. Returns the number of bytes read. Throws - /// an exception on failure. - template - std::size_t read_some(const MutableBufferSequence& buffers) - { - return stream_impl_.read_some(buffers); - } - - /// Read some data from the stream. Returns the number of bytes read or 0 if - /// an error occurred. - template - std::size_t read_some(const MutableBufferSequence& buffers, - boost::system::error_code& ec) - { - return stream_impl_.read_some(buffers, ec); - } - - /// Start an asynchronous read. The buffer into which the data will be read - /// must be valid for the lifetime of the asynchronous operation. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_read_some(const MutableBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - return stream_impl_.async_read_some(buffers, - BOOST_ASIO_MOVE_CAST(ReadHandler)(handler)); - } - - /// Peek at the incoming data on the stream. Returns the number of bytes read. - /// Throws an exception on failure. - template - std::size_t peek(const MutableBufferSequence& buffers) - { - return stream_impl_.peek(buffers); - } - - /// Peek at the incoming data on the stream. Returns the number of bytes read, - /// or 0 if an error occurred. - template - std::size_t peek(const MutableBufferSequence& buffers, - boost::system::error_code& ec) - { - return stream_impl_.peek(buffers, ec); - } - - /// Determine the amount of data that may be read without blocking. - std::size_t in_avail() - { - return stream_impl_.in_avail(); - } - - /// Determine the amount of data that may be read without blocking. - std::size_t in_avail(boost::system::error_code& ec) - { - return stream_impl_.in_avail(ec); - } - -private: - // The buffered write stream. - typedef buffered_write_stream write_stream_type; - write_stream_type inner_stream_impl_; - - // The buffered read stream. - typedef buffered_read_stream read_stream_type; - read_stream_type stream_impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_BUFFERED_STREAM_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream_fwd.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream_fwd.hpp deleted file mode 100644 index a1e965b2..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_stream_fwd.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// -// buffered_stream_fwd.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_BUFFERED_STREAM_FWD_HPP -#define BOOST_ASIO_BUFFERED_STREAM_FWD_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -namespace boost { -namespace asio { - -template -class buffered_stream; - -} // namespace asio -} // namespace boost - -#endif // BOOST_ASIO_BUFFERED_STREAM_FWD_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream.hpp deleted file mode 100644 index a1b9c440..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream.hpp +++ /dev/null @@ -1,251 +0,0 @@ -// -// buffered_write_stream.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_BUFFERED_WRITE_STREAM_HPP -#define BOOST_ASIO_BUFFERED_WRITE_STREAM_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Adds buffering to the write-related operations of a stream. -/** - * The buffered_write_stream class template can be used to add buffering to the - * synchronous and asynchronous write operations of a stream. - * - * @par Thread Safety - * @e Distinct @e objects: Safe.@n - * @e Shared @e objects: Unsafe. - * - * @par Concepts: - * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream. - */ -template -class buffered_write_stream - : private noncopyable -{ -public: - /// The type of the next layer. - typedef typename remove_reference::type next_layer_type; - - /// The type of the lowest layer. - typedef typename next_layer_type::lowest_layer_type lowest_layer_type; - - /// The type of the executor associated with the object. - typedef typename lowest_layer_type::executor_type executor_type; - -#if defined(GENERATING_DOCUMENTATION) - /// The default buffer size. - static const std::size_t default_buffer_size = implementation_defined; -#else - BOOST_ASIO_STATIC_CONSTANT(std::size_t, default_buffer_size = 1024); -#endif - - /// Construct, passing the specified argument to initialise the next layer. - template - explicit buffered_write_stream(Arg& a) - : next_layer_(a), - storage_(default_buffer_size) - { - } - - /// Construct, passing the specified argument to initialise the next layer. - template - buffered_write_stream(Arg& a, std::size_t buffer_size) - : next_layer_(a), - storage_(buffer_size) - { - } - - /// Get a reference to the next layer. - next_layer_type& next_layer() - { - return next_layer_; - } - - /// Get a reference to the lowest layer. - lowest_layer_type& lowest_layer() - { - return next_layer_.lowest_layer(); - } - - /// Get a const reference to the lowest layer. - const lowest_layer_type& lowest_layer() const - { - return next_layer_.lowest_layer(); - } - - /// Get the executor associated with the object. - executor_type get_executor() BOOST_ASIO_NOEXCEPT - { - return next_layer_.lowest_layer().get_executor(); - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - boost::asio::io_context& get_io_context() - { - return next_layer_.get_io_context(); - } - - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - boost::asio::io_context& get_io_service() - { - return next_layer_.get_io_service(); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Close the stream. - void close() - { - next_layer_.close(); - } - - /// Close the stream. - BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec) - { - next_layer_.close(ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Flush all data from the buffer to the next layer. Returns the number of - /// bytes written to the next layer on the last write operation. Throws an - /// exception on failure. - std::size_t flush(); - - /// Flush all data from the buffer to the next layer. Returns the number of - /// bytes written to the next layer on the last write operation, or 0 if an - /// error occurred. - std::size_t flush(boost::system::error_code& ec); - - /// Start an asynchronous flush. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_flush(BOOST_ASIO_MOVE_ARG(WriteHandler) handler); - - /// Write the given data to the stream. Returns the number of bytes written. - /// Throws an exception on failure. - template - std::size_t write_some(const ConstBufferSequence& buffers); - - /// Write the given data to the stream. Returns the number of bytes written, - /// or 0 if an error occurred and the error handler did not throw. - template - std::size_t write_some(const ConstBufferSequence& buffers, - boost::system::error_code& ec); - - /// Start an asynchronous write. The data being written must be valid for the - /// lifetime of the asynchronous operation. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_write_some(const ConstBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler); - - /// Read some data from the stream. Returns the number of bytes read. Throws - /// an exception on failure. - template - std::size_t read_some(const MutableBufferSequence& buffers) - { - return next_layer_.read_some(buffers); - } - - /// Read some data from the stream. Returns the number of bytes read or 0 if - /// an error occurred. - template - std::size_t read_some(const MutableBufferSequence& buffers, - boost::system::error_code& ec) - { - return next_layer_.read_some(buffers, ec); - } - - /// Start an asynchronous read. The buffer into which the data will be read - /// must be valid for the lifetime of the asynchronous operation. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_read_some(const MutableBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - return next_layer_.async_read_some(buffers, - BOOST_ASIO_MOVE_CAST(ReadHandler)(handler)); - } - - /// Peek at the incoming data on the stream. Returns the number of bytes read. - /// Throws an exception on failure. - template - std::size_t peek(const MutableBufferSequence& buffers) - { - return next_layer_.peek(buffers); - } - - /// Peek at the incoming data on the stream. Returns the number of bytes read, - /// or 0 if an error occurred. - template - std::size_t peek(const MutableBufferSequence& buffers, - boost::system::error_code& ec) - { - return next_layer_.peek(buffers, ec); - } - - /// Determine the amount of data that may be read without blocking. - std::size_t in_avail() - { - return next_layer_.in_avail(); - } - - /// Determine the amount of data that may be read without blocking. - std::size_t in_avail(boost::system::error_code& ec) - { - return next_layer_.in_avail(ec); - } - -private: - /// Copy data into the internal buffer from the specified source buffer. - /// Returns the number of bytes copied. - template - std::size_t copy(const ConstBufferSequence& buffers); - - /// The next layer. - Stream next_layer_; - - // The data in the buffer. - detail::buffered_stream_storage storage_; -}; - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif // BOOST_ASIO_BUFFERED_WRITE_STREAM_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream_fwd.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream_fwd.hpp deleted file mode 100644 index 4759cf28..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffered_write_stream_fwd.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// -// buffered_write_stream_fwd.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_BUFFERED_WRITE_STREAM_FWD_HPP -#define BOOST_ASIO_BUFFERED_WRITE_STREAM_FWD_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -namespace boost { -namespace asio { - -template -class buffered_write_stream; - -} // namespace asio -} // namespace boost - -#endif // BOOST_ASIO_BUFFERED_WRITE_STREAM_FWD_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffers_iterator.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffers_iterator.hpp deleted file mode 100644 index bebbca1b..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/buffers_iterator.hpp +++ /dev/null @@ -1,523 +0,0 @@ -// -// buffers_iterator.hpp -// ~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_BUFFERS_ITERATOR_HPP -#define BOOST_ASIO_BUFFERS_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -namespace detail -{ - template - struct buffers_iterator_types_helper; - - template <> - struct buffers_iterator_types_helper - { - typedef const_buffer buffer_type; - template - struct byte_type - { - typedef typename add_const::type type; - }; - }; - - template <> - struct buffers_iterator_types_helper - { - typedef mutable_buffer buffer_type; - template - struct byte_type - { - typedef ByteType type; - }; - }; - - template - struct buffers_iterator_types - { - enum - { - is_mutable = is_convertible< - typename BufferSequence::value_type, - mutable_buffer>::value - }; - typedef buffers_iterator_types_helper helper; - typedef typename helper::buffer_type buffer_type; - typedef typename helper::template byte_type::type byte_type; - typedef typename BufferSequence::const_iterator const_iterator; - }; - - template - struct buffers_iterator_types - { - typedef mutable_buffer buffer_type; - typedef ByteType byte_type; - typedef const mutable_buffer* const_iterator; - }; - - template - struct buffers_iterator_types - { - typedef const_buffer buffer_type; - typedef typename add_const::type byte_type; - typedef const const_buffer* const_iterator; - }; - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - - template - struct buffers_iterator_types - { - typedef mutable_buffer buffer_type; - typedef ByteType byte_type; - typedef const mutable_buffer* const_iterator; - }; - - template - struct buffers_iterator_types - { - typedef const_buffer buffer_type; - typedef typename add_const::type byte_type; - typedef const const_buffer* const_iterator; - }; - -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) -} - -/// A random access iterator over the bytes in a buffer sequence. -template -class buffers_iterator -{ -private: - typedef typename detail::buffers_iterator_types< - BufferSequence, ByteType>::buffer_type buffer_type; - - typedef typename detail::buffers_iterator_types::const_iterator buffer_sequence_iterator_type; - -public: - /// The type used for the distance between two iterators. - typedef std::ptrdiff_t difference_type; - - /// The type of the value pointed to by the iterator. - typedef ByteType value_type; - -#if defined(GENERATING_DOCUMENTATION) - /// The type of the result of applying operator->() to the iterator. - /** - * If the buffer sequence stores buffer objects that are convertible to - * mutable_buffer, this is a pointer to a non-const ByteType. Otherwise, a - * pointer to a const ByteType. - */ - typedef const_or_non_const_ByteType* pointer; -#else // defined(GENERATING_DOCUMENTATION) - typedef typename detail::buffers_iterator_types< - BufferSequence, ByteType>::byte_type* pointer; -#endif // defined(GENERATING_DOCUMENTATION) - -#if defined(GENERATING_DOCUMENTATION) - /// The type of the result of applying operator*() to the iterator. - /** - * If the buffer sequence stores buffer objects that are convertible to - * mutable_buffer, this is a reference to a non-const ByteType. Otherwise, a - * reference to a const ByteType. - */ - typedef const_or_non_const_ByteType& reference; -#else // defined(GENERATING_DOCUMENTATION) - typedef typename detail::buffers_iterator_types< - BufferSequence, ByteType>::byte_type& reference; -#endif // defined(GENERATING_DOCUMENTATION) - - /// The iterator category. - typedef std::random_access_iterator_tag iterator_category; - - /// Default constructor. Creates an iterator in an undefined state. - buffers_iterator() - : current_buffer_(), - current_buffer_position_(0), - begin_(), - current_(), - end_(), - position_(0) - { - } - - /// Construct an iterator representing the beginning of the buffers' data. - static buffers_iterator begin(const BufferSequence& buffers) -#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3) - __attribute__ ((__noinline__)) -#endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3) - { - buffers_iterator new_iter; - new_iter.begin_ = boost::asio::buffer_sequence_begin(buffers); - new_iter.current_ = boost::asio::buffer_sequence_begin(buffers); - new_iter.end_ = boost::asio::buffer_sequence_end(buffers); - while (new_iter.current_ != new_iter.end_) - { - new_iter.current_buffer_ = *new_iter.current_; - if (new_iter.current_buffer_.size() > 0) - break; - ++new_iter.current_; - } - return new_iter; - } - - /// Construct an iterator representing the end of the buffers' data. - static buffers_iterator end(const BufferSequence& buffers) -#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3) - __attribute__ ((__noinline__)) -#endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3) - { - buffers_iterator new_iter; - new_iter.begin_ = boost::asio::buffer_sequence_begin(buffers); - new_iter.current_ = boost::asio::buffer_sequence_begin(buffers); - new_iter.end_ = boost::asio::buffer_sequence_end(buffers); - while (new_iter.current_ != new_iter.end_) - { - buffer_type buffer = *new_iter.current_; - new_iter.position_ += buffer.size(); - ++new_iter.current_; - } - return new_iter; - } - - /// Dereference an iterator. - reference operator*() const - { - return dereference(); - } - - /// Dereference an iterator. - pointer operator->() const - { - return &dereference(); - } - - /// Access an individual element. - reference operator[](std::ptrdiff_t difference) const - { - buffers_iterator tmp(*this); - tmp.advance(difference); - return *tmp; - } - - /// Increment operator (prefix). - buffers_iterator& operator++() - { - increment(); - return *this; - } - - /// Increment operator (postfix). - buffers_iterator operator++(int) - { - buffers_iterator tmp(*this); - ++*this; - return tmp; - } - - /// Decrement operator (prefix). - buffers_iterator& operator--() - { - decrement(); - return *this; - } - - /// Decrement operator (postfix). - buffers_iterator operator--(int) - { - buffers_iterator tmp(*this); - --*this; - return tmp; - } - - /// Addition operator. - buffers_iterator& operator+=(std::ptrdiff_t difference) - { - advance(difference); - return *this; - } - - /// Subtraction operator. - buffers_iterator& operator-=(std::ptrdiff_t difference) - { - advance(-difference); - return *this; - } - - /// Addition operator. - friend buffers_iterator operator+(const buffers_iterator& iter, - std::ptrdiff_t difference) - { - buffers_iterator tmp(iter); - tmp.advance(difference); - return tmp; - } - - /// Addition operator. - friend buffers_iterator operator+(std::ptrdiff_t difference, - const buffers_iterator& iter) - { - buffers_iterator tmp(iter); - tmp.advance(difference); - return tmp; - } - - /// Subtraction operator. - friend buffers_iterator operator-(const buffers_iterator& iter, - std::ptrdiff_t difference) - { - buffers_iterator tmp(iter); - tmp.advance(-difference); - return tmp; - } - - /// Subtraction operator. - friend std::ptrdiff_t operator-(const buffers_iterator& a, - const buffers_iterator& b) - { - return b.distance_to(a); - } - - /// Test two iterators for equality. - friend bool operator==(const buffers_iterator& a, const buffers_iterator& b) - { - return a.equal(b); - } - - /// Test two iterators for inequality. - friend bool operator!=(const buffers_iterator& a, const buffers_iterator& b) - { - return !a.equal(b); - } - - /// Compare two iterators. - friend bool operator<(const buffers_iterator& a, const buffers_iterator& b) - { - return a.distance_to(b) > 0; - } - - /// Compare two iterators. - friend bool operator<=(const buffers_iterator& a, const buffers_iterator& b) - { - return !(b < a); - } - - /// Compare two iterators. - friend bool operator>(const buffers_iterator& a, const buffers_iterator& b) - { - return b < a; - } - - /// Compare two iterators. - friend bool operator>=(const buffers_iterator& a, const buffers_iterator& b) - { - return !(a < b); - } - -private: - // Dereference the iterator. - reference dereference() const - { - return static_cast( - current_buffer_.data())[current_buffer_position_]; - } - - // Compare two iterators for equality. - bool equal(const buffers_iterator& other) const - { - return position_ == other.position_; - } - - // Increment the iterator. - void increment() - { - BOOST_ASIO_ASSERT(current_ != end_ && "iterator out of bounds"); - ++position_; - - // Check if the increment can be satisfied by the current buffer. - ++current_buffer_position_; - if (current_buffer_position_ != current_buffer_.size()) - return; - - // Find the next non-empty buffer. - ++current_; - current_buffer_position_ = 0; - while (current_ != end_) - { - current_buffer_ = *current_; - if (current_buffer_.size() > 0) - return; - ++current_; - } - } - - // Decrement the iterator. - void decrement() - { - BOOST_ASIO_ASSERT(position_ > 0 && "iterator out of bounds"); - --position_; - - // Check if the decrement can be satisfied by the current buffer. - if (current_buffer_position_ != 0) - { - --current_buffer_position_; - return; - } - - // Find the previous non-empty buffer. - buffer_sequence_iterator_type iter = current_; - while (iter != begin_) - { - --iter; - buffer_type buffer = *iter; - std::size_t buffer_size = buffer.size(); - if (buffer_size > 0) - { - current_ = iter; - current_buffer_ = buffer; - current_buffer_position_ = buffer_size - 1; - return; - } - } - } - - // Advance the iterator by the specified distance. - void advance(std::ptrdiff_t n) - { - if (n > 0) - { - BOOST_ASIO_ASSERT(current_ != end_ && "iterator out of bounds"); - for (;;) - { - std::ptrdiff_t current_buffer_balance - = current_buffer_.size() - current_buffer_position_; - - // Check if the advance can be satisfied by the current buffer. - if (current_buffer_balance > n) - { - position_ += n; - current_buffer_position_ += n; - return; - } - - // Update position. - n -= current_buffer_balance; - position_ += current_buffer_balance; - - // Move to next buffer. If it is empty then it will be skipped on the - // next iteration of this loop. - if (++current_ == end_) - { - BOOST_ASIO_ASSERT(n == 0 && "iterator out of bounds"); - current_buffer_ = buffer_type(); - current_buffer_position_ = 0; - return; - } - current_buffer_ = *current_; - current_buffer_position_ = 0; - } - } - else if (n < 0) - { - std::size_t abs_n = -n; - BOOST_ASIO_ASSERT(position_ >= abs_n && "iterator out of bounds"); - for (;;) - { - // Check if the advance can be satisfied by the current buffer. - if (current_buffer_position_ >= abs_n) - { - position_ -= abs_n; - current_buffer_position_ -= abs_n; - return; - } - - // Update position. - abs_n -= current_buffer_position_; - position_ -= current_buffer_position_; - - // Check if we've reached the beginning of the buffers. - if (current_ == begin_) - { - BOOST_ASIO_ASSERT(abs_n == 0 && "iterator out of bounds"); - current_buffer_position_ = 0; - return; - } - - // Find the previous non-empty buffer. - buffer_sequence_iterator_type iter = current_; - while (iter != begin_) - { - --iter; - buffer_type buffer = *iter; - std::size_t buffer_size = buffer.size(); - if (buffer_size > 0) - { - current_ = iter; - current_buffer_ = buffer; - current_buffer_position_ = buffer_size; - break; - } - } - } - } - } - - // Determine the distance between two iterators. - std::ptrdiff_t distance_to(const buffers_iterator& other) const - { - return other.position_ - position_; - } - - buffer_type current_buffer_; - std::size_t current_buffer_position_; - buffer_sequence_iterator_type begin_; - buffer_sequence_iterator_type current_; - buffer_sequence_iterator_type end_; - std::size_t position_; -}; - -/// Construct an iterator representing the beginning of the buffers' data. -template -inline buffers_iterator buffers_begin( - const BufferSequence& buffers) -{ - return buffers_iterator::begin(buffers); -} - -/// Construct an iterator representing the end of the buffers' data. -template -inline buffers_iterator buffers_end( - const BufferSequence& buffers) -{ - return buffers_iterator::end(buffers); -} - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_BUFFERS_ITERATOR_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/completion_condition.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/completion_condition.hpp deleted file mode 100644 index d64efffe..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/completion_condition.hpp +++ /dev/null @@ -1,220 +0,0 @@ -// -// completion_condition.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_COMPLETION_CONDITION_HPP -#define BOOST_ASIO_COMPLETION_CONDITION_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include - -#include - -namespace boost { -namespace asio { - -namespace detail { - -// The default maximum number of bytes to transfer in a single operation. -enum default_max_transfer_size_t { default_max_transfer_size = 65536 }; - -// Adapt result of old-style completion conditions (which had a bool result -// where true indicated that the operation was complete). -inline std::size_t adapt_completion_condition_result(bool result) -{ - return result ? 0 : default_max_transfer_size; -} - -// Adapt result of current completion conditions (which have a size_t result -// where 0 means the operation is complete, and otherwise the result is the -// maximum number of bytes to transfer on the next underlying operation). -inline std::size_t adapt_completion_condition_result(std::size_t result) -{ - return result; -} - -class transfer_all_t -{ -public: - typedef std::size_t result_type; - - template - std::size_t operator()(const Error& err, std::size_t) - { - return !!err ? 0 : default_max_transfer_size; - } -}; - -class transfer_at_least_t -{ -public: - typedef std::size_t result_type; - - explicit transfer_at_least_t(std::size_t minimum) - : minimum_(minimum) - { - } - - template - std::size_t operator()(const Error& err, std::size_t bytes_transferred) - { - return (!!err || bytes_transferred >= minimum_) - ? 0 : default_max_transfer_size; - } - -private: - std::size_t minimum_; -}; - -class transfer_exactly_t -{ -public: - typedef std::size_t result_type; - - explicit transfer_exactly_t(std::size_t size) - : size_(size) - { - } - - template - std::size_t operator()(const Error& err, std::size_t bytes_transferred) - { - return (!!err || bytes_transferred >= size_) ? 0 : - (size_ - bytes_transferred < default_max_transfer_size - ? size_ - bytes_transferred : std::size_t(default_max_transfer_size)); - } - -private: - std::size_t size_; -}; - -} // namespace detail - -/** - * @defgroup completion_condition Completion Condition Function Objects - * - * Function objects used for determining when a read or write operation should - * complete. - */ -/*@{*/ - -/// Return a completion condition function object that indicates that a read or -/// write operation should continue until all of the data has been transferred, -/// or until an error occurs. -/** - * This function is used to create an object, of unspecified type, that meets - * CompletionCondition requirements. - * - * @par Example - * Reading until a buffer is full: - * @code - * boost::array buf; - * boost::system::error_code ec; - * std::size_t n = boost::asio::read( - * sock, boost::asio::buffer(buf), - * boost::asio::transfer_all(), ec); - * if (ec) - * { - * // An error occurred. - * } - * else - * { - * // n == 128 - * } - * @endcode - */ -#if defined(GENERATING_DOCUMENTATION) -unspecified transfer_all(); -#else -inline detail::transfer_all_t transfer_all() -{ - return detail::transfer_all_t(); -} -#endif - -/// Return a completion condition function object that indicates that a read or -/// write operation should continue until a minimum number of bytes has been -/// transferred, or until an error occurs. -/** - * This function is used to create an object, of unspecified type, that meets - * CompletionCondition requirements. - * - * @par Example - * Reading until a buffer is full or contains at least 64 bytes: - * @code - * boost::array buf; - * boost::system::error_code ec; - * std::size_t n = boost::asio::read( - * sock, boost::asio::buffer(buf), - * boost::asio::transfer_at_least(64), ec); - * if (ec) - * { - * // An error occurred. - * } - * else - * { - * // n >= 64 && n <= 128 - * } - * @endcode - */ -#if defined(GENERATING_DOCUMENTATION) -unspecified transfer_at_least(std::size_t minimum); -#else -inline detail::transfer_at_least_t transfer_at_least(std::size_t minimum) -{ - return detail::transfer_at_least_t(minimum); -} -#endif - -/// Return a completion condition function object that indicates that a read or -/// write operation should continue until an exact number of bytes has been -/// transferred, or until an error occurs. -/** - * This function is used to create an object, of unspecified type, that meets - * CompletionCondition requirements. - * - * @par Example - * Reading until a buffer is full or contains exactly 64 bytes: - * @code - * boost::array buf; - * boost::system::error_code ec; - * std::size_t n = boost::asio::read( - * sock, boost::asio::buffer(buf), - * boost::asio::transfer_exactly(64), ec); - * if (ec) - * { - * // An error occurred. - * } - * else - * { - * // n == 64 - * } - * @endcode - */ -#if defined(GENERATING_DOCUMENTATION) -unspecified transfer_exactly(std::size_t size); -#else -inline detail::transfer_exactly_t transfer_exactly(std::size_t size) -{ - return detail::transfer_exactly_t(size); -} -#endif - -/*@}*/ - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_COMPLETION_CONDITION_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/connect.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/connect.hpp deleted file mode 100644 index e31e8c92..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/connect.hpp +++ /dev/null @@ -1,1061 +0,0 @@ -// -// connect.hpp -// ~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_CONNECT_HPP -#define BOOST_ASIO_CONNECT_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -namespace detail -{ - char (&has_iterator_helper(...))[2]; - - template - char has_iterator_helper(T*, typename T::iterator* = 0); - - template - struct has_iterator_typedef - { - enum { value = (sizeof((has_iterator_helper)((T*)(0))) == 1) }; - }; -} // namespace detail - -/// Type trait used to determine whether a type is an endpoint sequence that can -/// be used with with @c connect and @c async_connect. -template -struct is_endpoint_sequence -{ -#if defined(GENERATING_DOCUMENTATION) - /// The value member is true if the type may be used as an endpoint sequence. - static const bool value; -#else - enum - { - value = detail::has_iterator_typedef::value - }; -#endif -}; - -/** - * @defgroup connect boost::asio::connect - * - * @brief Establishes a socket connection by trying each endpoint in a sequence. - */ -/*@{*/ - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param endpoints A sequence of endpoints. - * - * @returns The successfully connected endpoint. - * - * @throws boost::system::system_error Thrown on failure. If the sequence is - * empty, the associated @c error_code is boost::asio::error::not_found. - * Otherwise, contains the error from the last connection attempt. - * - * @par Example - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::socket s(io_context); - * boost::asio::connect(s, r.resolve(q)); @endcode - */ -template -typename Protocol::endpoint connect( - basic_socket& s, - const EndpointSequence& endpoints, - typename enable_if::value>::type* = 0); - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param endpoints A sequence of endpoints. - * - * @param ec Set to indicate what error occurred, if any. If the sequence is - * empty, set to boost::asio::error::not_found. Otherwise, contains the error - * from the last connection attempt. - * - * @returns On success, the successfully connected endpoint. Otherwise, a - * default-constructed endpoint. - * - * @par Example - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::socket s(io_context); - * boost::system::error_code ec; - * boost::asio::connect(s, r.resolve(q), ec); - * if (ec) - * { - * // An error occurred. - * } @endcode - */ -template -typename Protocol::endpoint connect( - basic_socket& s, - const EndpointSequence& endpoints, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) -/// (Deprecated.) Establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @returns On success, an iterator denoting the successfully connected - * endpoint. Otherwise, the end iterator. - * - * @throws boost::system::system_error Thrown on failure. If the sequence is - * empty, the associated @c error_code is boost::asio::error::not_found. - * Otherwise, contains the error from the last connection attempt. - * - * @note This overload assumes that a default constructed object of type @c - * Iterator represents the end of the sequence. This is a valid assumption for - * iterator types such as @c boost::asio::ip::tcp::resolver::iterator. - */ -template -Iterator connect(basic_socket& s, Iterator begin, - typename enable_if::value>::type* = 0); - -/// (Deprecated.) Establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param ec Set to indicate what error occurred, if any. If the sequence is - * empty, set to boost::asio::error::not_found. Otherwise, contains the error - * from the last connection attempt. - * - * @returns On success, an iterator denoting the successfully connected - * endpoint. Otherwise, the end iterator. - * - * @note This overload assumes that a default constructed object of type @c - * Iterator represents the end of the sequence. This is a valid assumption for - * iterator types such as @c boost::asio::ip::tcp::resolver::iterator. - */ -template -Iterator connect(basic_socket& s, - Iterator begin, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param end An iterator pointing to the end of a sequence of endpoints. - * - * @returns An iterator denoting the successfully connected endpoint. - * - * @throws boost::system::system_error Thrown on failure. If the sequence is - * empty, the associated @c error_code is boost::asio::error::not_found. - * Otherwise, contains the error from the last connection attempt. - * - * @par Example - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::resolver::results_type e = r.resolve(q); - * tcp::socket s(io_context); - * boost::asio::connect(s, e.begin(), e.end()); @endcode - */ -template -Iterator connect(basic_socket& s, - Iterator begin, Iterator end); - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param end An iterator pointing to the end of a sequence of endpoints. - * - * @param ec Set to indicate what error occurred, if any. If the sequence is - * empty, set to boost::asio::error::not_found. Otherwise, contains the error - * from the last connection attempt. - * - * @returns On success, an iterator denoting the successfully connected - * endpoint. Otherwise, the end iterator. - * - * @par Example - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::resolver::results_type e = r.resolve(q); - * tcp::socket s(io_context); - * boost::system::error_code ec; - * boost::asio::connect(s, e.begin(), e.end(), ec); - * if (ec) - * { - * // An error occurred. - * } @endcode - */ -template -Iterator connect(basic_socket& s, - Iterator begin, Iterator end, boost::system::error_code& ec); - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param endpoints A sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @returns The successfully connected endpoint. - * - * @throws boost::system::system_error Thrown on failure. If the sequence is - * empty, the associated @c error_code is boost::asio::error::not_found. - * Otherwise, contains the error from the last connection attempt. - * - * @par Example - * The following connect condition function object can be used to output - * information about the individual connection attempts: - * @code struct my_connect_condition - * { - * bool operator()( - * const boost::system::error_code& ec, - * const::tcp::endpoint& next) - * { - * if (ec) std::cout << "Error: " << ec.message() << std::endl; - * std::cout << "Trying: " << next << std::endl; - * return true; - * } - * }; @endcode - * It would be used with the boost::asio::connect function as follows: - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::socket s(io_context); - * tcp::endpoint e = boost::asio::connect(s, - * r.resolve(q), my_connect_condition()); - * std::cout << "Connected to: " << e << std::endl; @endcode - */ -template -typename Protocol::endpoint connect( - basic_socket& s, - const EndpointSequence& endpoints, ConnectCondition connect_condition, - typename enable_if::value>::type* = 0); - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param endpoints A sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @param ec Set to indicate what error occurred, if any. If the sequence is - * empty, set to boost::asio::error::not_found. Otherwise, contains the error - * from the last connection attempt. - * - * @returns On success, the successfully connected endpoint. Otherwise, a - * default-constructed endpoint. - * - * @par Example - * The following connect condition function object can be used to output - * information about the individual connection attempts: - * @code struct my_connect_condition - * { - * bool operator()( - * const boost::system::error_code& ec, - * const::tcp::endpoint& next) - * { - * if (ec) std::cout << "Error: " << ec.message() << std::endl; - * std::cout << "Trying: " << next << std::endl; - * return true; - * } - * }; @endcode - * It would be used with the boost::asio::connect function as follows: - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::socket s(io_context); - * boost::system::error_code ec; - * tcp::endpoint e = boost::asio::connect(s, - * r.resolve(q), my_connect_condition(), ec); - * if (ec) - * { - * // An error occurred. - * } - * else - * { - * std::cout << "Connected to: " << e << std::endl; - * } @endcode - */ -template -typename Protocol::endpoint connect( - basic_socket& s, - const EndpointSequence& endpoints, ConnectCondition connect_condition, - boost::system::error_code& ec, - typename enable_if::value>::type* = 0); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) -/// (Deprecated.) Establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @returns On success, an iterator denoting the successfully connected - * endpoint. Otherwise, the end iterator. - * - * @throws boost::system::system_error Thrown on failure. If the sequence is - * empty, the associated @c error_code is boost::asio::error::not_found. - * Otherwise, contains the error from the last connection attempt. - * - * @note This overload assumes that a default constructed object of type @c - * Iterator represents the end of the sequence. This is a valid assumption for - * iterator types such as @c boost::asio::ip::tcp::resolver::iterator. - */ -template -Iterator connect(basic_socket& s, - Iterator begin, ConnectCondition connect_condition, - typename enable_if::value>::type* = 0); - -/// (Deprecated.) Establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @param ec Set to indicate what error occurred, if any. If the sequence is - * empty, set to boost::asio::error::not_found. Otherwise, contains the error - * from the last connection attempt. - * - * @returns On success, an iterator denoting the successfully connected - * endpoint. Otherwise, the end iterator. - * - * @note This overload assumes that a default constructed object of type @c - * Iterator represents the end of the sequence. This is a valid assumption for - * iterator types such as @c boost::asio::ip::tcp::resolver::iterator. - */ -template -Iterator connect(basic_socket& s, Iterator begin, - ConnectCondition connect_condition, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param end An iterator pointing to the end of a sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @returns An iterator denoting the successfully connected endpoint. - * - * @throws boost::system::system_error Thrown on failure. If the sequence is - * empty, the associated @c error_code is boost::asio::error::not_found. - * Otherwise, contains the error from the last connection attempt. - * - * @par Example - * The following connect condition function object can be used to output - * information about the individual connection attempts: - * @code struct my_connect_condition - * { - * bool operator()( - * const boost::system::error_code& ec, - * const::tcp::endpoint& next) - * { - * if (ec) std::cout << "Error: " << ec.message() << std::endl; - * std::cout << "Trying: " << next << std::endl; - * return true; - * } - * }; @endcode - * It would be used with the boost::asio::connect function as follows: - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::resolver::results_type e = r.resolve(q); - * tcp::socket s(io_context); - * tcp::resolver::results_type::iterator i = boost::asio::connect( - * s, e.begin(), e.end(), my_connect_condition()); - * std::cout << "Connected to: " << i->endpoint() << std::endl; @endcode - */ -template -Iterator connect(basic_socket& s, Iterator begin, - Iterator end, ConnectCondition connect_condition); - -/// Establishes a socket connection by trying each endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c connect member - * function, once for each endpoint in the sequence, until a connection is - * successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param end An iterator pointing to the end of a sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @param ec Set to indicate what error occurred, if any. If the sequence is - * empty, set to boost::asio::error::not_found. Otherwise, contains the error - * from the last connection attempt. - * - * @returns On success, an iterator denoting the successfully connected - * endpoint. Otherwise, the end iterator. - * - * @par Example - * The following connect condition function object can be used to output - * information about the individual connection attempts: - * @code struct my_connect_condition - * { - * bool operator()( - * const boost::system::error_code& ec, - * const::tcp::endpoint& next) - * { - * if (ec) std::cout << "Error: " << ec.message() << std::endl; - * std::cout << "Trying: " << next << std::endl; - * return true; - * } - * }; @endcode - * It would be used with the boost::asio::connect function as follows: - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::resolver::results_type e = r.resolve(q); - * tcp::socket s(io_context); - * boost::system::error_code ec; - * tcp::resolver::results_type::iterator i = boost::asio::connect( - * s, e.begin(), e.end(), my_connect_condition()); - * if (ec) - * { - * // An error occurred. - * } - * else - * { - * std::cout << "Connected to: " << i->endpoint() << std::endl; - * } @endcode - */ -template -Iterator connect(basic_socket& s, - Iterator begin, Iterator end, ConnectCondition connect_condition, - boost::system::error_code& ec); - -/*@}*/ - -/** - * @defgroup async_connect boost::asio::async_connect - * - * @brief Asynchronously establishes a socket connection by trying each - * endpoint in a sequence. - */ -/*@{*/ - -/// Asynchronously establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c async_connect - * member function, once for each endpoint in the sequence, until a connection - * is successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param endpoints A sequence of endpoints. - * - * @param handler The handler to be called when the connect operation - * completes. Copies will be made of the handler as required. The function - * signature of the handler must be: - * @code void handler( - * // Result of operation. if the sequence is empty, set to - * // boost::asio::error::not_found. Otherwise, contains the - * // error from the last connection attempt. - * const boost::system::error_code& error, - * - * // On success, the successfully connected endpoint. - * // Otherwise, a default-constructed endpoint. - * const typename Protocol::endpoint& endpoint - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::socket s(io_context); - * - * // ... - * - * r.async_resolve(q, resolve_handler); - * - * // ... - * - * void resolve_handler( - * const boost::system::error_code& ec, - * tcp::resolver::results_type results) - * { - * if (!ec) - * { - * boost::asio::async_connect(s, results, connect_handler); - * } - * } - * - * // ... - * - * void connect_handler( - * const boost::system::error_code& ec, - * const tcp::endpoint& endpoint) - * { - * // ... - * } @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler, - void (boost::system::error_code, typename Protocol::endpoint)) -async_connect(basic_socket& s, - const EndpointSequence& endpoints, - BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler, - typename enable_if::value>::type* = 0); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) -/// (Deprecated.) Asynchronously establishes a socket connection by trying each -/// endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c async_connect - * member function, once for each endpoint in the sequence, until a connection - * is successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param handler The handler to be called when the connect operation - * completes. Copies will be made of the handler as required. The function - * signature of the handler must be: - * @code void handler( - * // Result of operation. if the sequence is empty, set to - * // boost::asio::error::not_found. Otherwise, contains the - * // error from the last connection attempt. - * const boost::system::error_code& error, - * - * // On success, an iterator denoting the successfully - * // connected endpoint. Otherwise, the end iterator. - * Iterator iterator - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note This overload assumes that a default constructed object of type @c - * Iterator represents the end of the sequence. This is a valid assumption for - * iterator types such as @c boost::asio::ip::tcp::resolver::iterator. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler, - void (boost::system::error_code, Iterator)) -async_connect(basic_socket& s, - Iterator begin, BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler, - typename enable_if::value>::type* = 0); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -/// Asynchronously establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c async_connect - * member function, once for each endpoint in the sequence, until a connection - * is successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param end An iterator pointing to the end of a sequence of endpoints. - * - * @param handler The handler to be called when the connect operation - * completes. Copies will be made of the handler as required. The function - * signature of the handler must be: - * @code void handler( - * // Result of operation. if the sequence is empty, set to - * // boost::asio::error::not_found. Otherwise, contains the - * // error from the last connection attempt. - * const boost::system::error_code& error, - * - * // On success, an iterator denoting the successfully - * // connected endpoint. Otherwise, the end iterator. - * Iterator iterator - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * @code std::vector endpoints = ...; - * tcp::socket s(io_context); - * boost::asio::async_connect(s, - * endpoints.begin(), endpoints.end(), - * connect_handler); - * - * // ... - * - * void connect_handler( - * const boost::system::error_code& ec, - * std::vector::iterator i) - * { - * // ... - * } @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler, - void (boost::system::error_code, Iterator)) -async_connect(basic_socket& s, - Iterator begin, Iterator end, - BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler); - -/// Asynchronously establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c async_connect - * member function, once for each endpoint in the sequence, until a connection - * is successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param endpoints A sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @param handler The handler to be called when the connect operation - * completes. Copies will be made of the handler as required. The function - * signature of the handler must be: - * @code void handler( - * // Result of operation. if the sequence is empty, set to - * // boost::asio::error::not_found. Otherwise, contains the - * // error from the last connection attempt. - * const boost::system::error_code& error, - * - * // On success, an iterator denoting the successfully - * // connected endpoint. Otherwise, the end iterator. - * Iterator iterator - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * The following connect condition function object can be used to output - * information about the individual connection attempts: - * @code struct my_connect_condition - * { - * bool operator()( - * const boost::system::error_code& ec, - * const::tcp::endpoint& next) - * { - * if (ec) std::cout << "Error: " << ec.message() << std::endl; - * std::cout << "Trying: " << next << std::endl; - * return true; - * } - * }; @endcode - * It would be used with the boost::asio::connect function as follows: - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::socket s(io_context); - * - * // ... - * - * r.async_resolve(q, resolve_handler); - * - * // ... - * - * void resolve_handler( - * const boost::system::error_code& ec, - * tcp::resolver::results_type results) - * { - * if (!ec) - * { - * boost::asio::async_connect(s, results, - * my_connect_condition(), - * connect_handler); - * } - * } - * - * // ... - * - * void connect_handler( - * const boost::system::error_code& ec, - * const tcp::endpoint& endpoint) - * { - * if (ec) - * { - * // An error occurred. - * } - * else - * { - * std::cout << "Connected to: " << endpoint << std::endl; - * } - * } @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler, - void (boost::system::error_code, typename Protocol::endpoint)) -async_connect(basic_socket& s, - const EndpointSequence& endpoints, ConnectCondition connect_condition, - BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler, - typename enable_if::value>::type* = 0); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) -/// (Deprecated.) Asynchronously establishes a socket connection by trying each -/// endpoint in a sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c async_connect - * member function, once for each endpoint in the sequence, until a connection - * is successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @param handler The handler to be called when the connect operation - * completes. Copies will be made of the handler as required. The function - * signature of the handler must be: - * @code void handler( - * // Result of operation. if the sequence is empty, set to - * // boost::asio::error::not_found. Otherwise, contains the - * // error from the last connection attempt. - * const boost::system::error_code& error, - * - * // On success, an iterator denoting the successfully - * // connected endpoint. Otherwise, the end iterator. - * Iterator iterator - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note This overload assumes that a default constructed object of type @c - * Iterator represents the end of the sequence. This is a valid assumption for - * iterator types such as @c boost::asio::ip::tcp::resolver::iterator. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler, - void (boost::system::error_code, Iterator)) -async_connect(basic_socket& s, Iterator begin, - ConnectCondition connect_condition, - BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler, - typename enable_if::value>::type* = 0); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -/// Asynchronously establishes a socket connection by trying each endpoint in a -/// sequence. -/** - * This function attempts to connect a socket to one of a sequence of - * endpoints. It does this by repeated calls to the socket's @c async_connect - * member function, once for each endpoint in the sequence, until a connection - * is successfully established. - * - * @param s The socket to be connected. If the socket is already open, it will - * be closed. - * - * @param begin An iterator pointing to the start of a sequence of endpoints. - * - * @param end An iterator pointing to the end of a sequence of endpoints. - * - * @param connect_condition A function object that is called prior to each - * connection attempt. The signature of the function object must be: - * @code bool connect_condition( - * const boost::system::error_code& ec, - * const typename Protocol::endpoint& next); @endcode - * The @c ec parameter contains the result from the most recent connect - * operation. Before the first connection attempt, @c ec is always set to - * indicate success. The @c next parameter is the next endpoint to be tried. - * The function object should return true if the next endpoint should be tried, - * and false if it should be skipped. - * - * @param handler The handler to be called when the connect operation - * completes. Copies will be made of the handler as required. The function - * signature of the handler must be: - * @code void handler( - * // Result of operation. if the sequence is empty, set to - * // boost::asio::error::not_found. Otherwise, contains the - * // error from the last connection attempt. - * const boost::system::error_code& error, - * - * // On success, an iterator denoting the successfully - * // connected endpoint. Otherwise, the end iterator. - * Iterator iterator - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * The following connect condition function object can be used to output - * information about the individual connection attempts: - * @code struct my_connect_condition - * { - * bool operator()( - * const boost::system::error_code& ec, - * const::tcp::endpoint& next) - * { - * if (ec) std::cout << "Error: " << ec.message() << std::endl; - * std::cout << "Trying: " << next << std::endl; - * return true; - * } - * }; @endcode - * It would be used with the boost::asio::connect function as follows: - * @code tcp::resolver r(io_context); - * tcp::resolver::query q("host", "service"); - * tcp::socket s(io_context); - * - * // ... - * - * r.async_resolve(q, resolve_handler); - * - * // ... - * - * void resolve_handler( - * const boost::system::error_code& ec, - * tcp::resolver::iterator i) - * { - * if (!ec) - * { - * tcp::resolver::iterator end; - * boost::asio::async_connect(s, i, end, - * my_connect_condition(), - * connect_handler); - * } - * } - * - * // ... - * - * void connect_handler( - * const boost::system::error_code& ec, - * tcp::resolver::iterator i) - * { - * if (ec) - * { - * // An error occurred. - * } - * else - * { - * std::cout << "Connected to: " << i->endpoint() << std::endl; - * } - * } @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler, - void (boost::system::error_code, Iterator)) -async_connect(basic_socket& s, - Iterator begin, Iterator end, ConnectCondition connect_condition, - BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler); - -/*@}*/ - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/coroutine.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/coroutine.hpp deleted file mode 100644 index 7ac354de..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/coroutine.hpp +++ /dev/null @@ -1,330 +0,0 @@ -// -// coroutine.hpp -// ~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_COROUTINE_HPP -#define BOOST_ASIO_COROUTINE_HPP - -namespace boost { -namespace asio { -namespace detail { - -class coroutine_ref; - -} // namespace detail - -/// Provides support for implementing stackless coroutines. -/** - * The @c coroutine class may be used to implement stackless coroutines. The - * class itself is used to store the current state of the coroutine. - * - * Coroutines are copy-constructible and assignable, and the space overhead is - * a single int. They can be used as a base class: - * - * @code class session : coroutine - * { - * ... - * }; @endcode - * - * or as a data member: - * - * @code class session - * { - * ... - * coroutine coro_; - * }; @endcode - * - * or even bound in as a function argument using lambdas or @c bind(). The - * important thing is that as the application maintains a copy of the object - * for as long as the coroutine must be kept alive. - * - * @par Pseudo-keywords - * - * A coroutine is used in conjunction with certain "pseudo-keywords", which - * are implemented as macros. These macros are defined by a header file: - * - * @code #include @endcode - * - * and may conversely be undefined as follows: - * - * @code #include @endcode - * - * reenter - * - * The @c reenter macro is used to define the body of a coroutine. It takes a - * single argument: a pointer or reference to a coroutine object. For example, - * if the base class is a coroutine object you may write: - * - * @code reenter (this) - * { - * ... coroutine body ... - * } @endcode - * - * and if a data member or other variable you can write: - * - * @code reenter (coro_) - * { - * ... coroutine body ... - * } @endcode - * - * When @c reenter is executed at runtime, control jumps to the location of the - * last @c yield or @c fork. - * - * The coroutine body may also be a single statement, such as: - * - * @code reenter (this) for (;;) - * { - * ... - * } @endcode - * - * @b Limitation: The @c reenter macro is implemented using a switch. This - * means that you must take care when using local variables within the - * coroutine body. The local variable is not allowed in a position where - * reentering the coroutine could bypass the variable definition. - * - * yield statement - * - * This form of the @c yield keyword is often used with asynchronous operations: - * - * @code yield socket_->async_read_some(buffer(*buffer_), *this); @endcode - * - * This divides into four logical steps: - * - * @li @c yield saves the current state of the coroutine. - * @li The statement initiates the asynchronous operation. - * @li The resume point is defined immediately following the statement. - * @li Control is transferred to the end of the coroutine body. - * - * When the asynchronous operation completes, the function object is invoked - * and @c reenter causes control to transfer to the resume point. It is - * important to remember to carry the coroutine state forward with the - * asynchronous operation. In the above snippet, the current class is a - * function object object with a coroutine object as base class or data member. - * - * The statement may also be a compound statement, and this permits us to - * define local variables with limited scope: - * - * @code yield - * { - * mutable_buffers_1 b = buffer(*buffer_); - * socket_->async_read_some(b, *this); - * } @endcode - * - * yield return expression ; - * - * This form of @c yield is often used in generators or coroutine-based parsers. - * For example, the function object: - * - * @code struct interleave : coroutine - * { - * istream& is1; - * istream& is2; - * char operator()(char c) - * { - * reenter (this) for (;;) - * { - * yield return is1.get(); - * yield return is2.get(); - * } - * } - * }; @endcode - * - * defines a trivial coroutine that interleaves the characters from two input - * streams. - * - * This type of @c yield divides into three logical steps: - * - * @li @c yield saves the current state of the coroutine. - * @li The resume point is defined immediately following the semicolon. - * @li The value of the expression is returned from the function. - * - * yield ; - * - * This form of @c yield is equivalent to the following steps: - * - * @li @c yield saves the current state of the coroutine. - * @li The resume point is defined immediately following the semicolon. - * @li Control is transferred to the end of the coroutine body. - * - * This form might be applied when coroutines are used for cooperative - * threading and scheduling is explicitly managed. For example: - * - * @code struct task : coroutine - * { - * ... - * void operator()() - * { - * reenter (this) - * { - * while (... not finished ...) - * { - * ... do something ... - * yield; - * ... do some more ... - * yield; - * } - * } - * } - * ... - * }; - * ... - * task t1, t2; - * for (;;) - * { - * t1(); - * t2(); - * } @endcode - * - * yield break ; - * - * The final form of @c yield is used to explicitly terminate the coroutine. - * This form is comprised of two steps: - * - * @li @c yield sets the coroutine state to indicate termination. - * @li Control is transferred to the end of the coroutine body. - * - * Once terminated, calls to is_complete() return true and the coroutine cannot - * be reentered. - * - * Note that a coroutine may also be implicitly terminated if the coroutine - * body is exited without a yield, e.g. by return, throw or by running to the - * end of the body. - * - * fork statement - * - * The @c fork pseudo-keyword is used when "forking" a coroutine, i.e. splitting - * it into two (or more) copies. One use of @c fork is in a server, where a new - * coroutine is created to handle each client connection: - * - * @code reenter (this) - * { - * do - * { - * socket_.reset(new tcp::socket(io_context_)); - * yield acceptor->async_accept(*socket_, *this); - * fork server(*this)(); - * } while (is_parent()); - * ... client-specific handling follows ... - * } @endcode - * - * The logical steps involved in a @c fork are: - * - * @li @c fork saves the current state of the coroutine. - * @li The statement creates a copy of the coroutine and either executes it - * immediately or schedules it for later execution. - * @li The resume point is defined immediately following the semicolon. - * @li For the "parent", control immediately continues from the next line. - * - * The functions is_parent() and is_child() can be used to differentiate - * between parent and child. You would use these functions to alter subsequent - * control flow. - * - * Note that @c fork doesn't do the actual forking by itself. It is the - * application's responsibility to create a clone of the coroutine and call it. - * The clone can be called immediately, as above, or scheduled for delayed - * execution using something like io_context::post(). - * - * @par Alternate macro names - * - * If preferred, an application can use macro names that follow a more typical - * naming convention, rather than the pseudo-keywords. These are: - * - * @li @c BOOST_ASIO_CORO_REENTER instead of @c reenter - * @li @c BOOST_ASIO_CORO_YIELD instead of @c yield - * @li @c BOOST_ASIO_CORO_FORK instead of @c fork - */ -class coroutine -{ -public: - /// Constructs a coroutine in its initial state. - coroutine() : value_(0) {} - - /// Returns true if the coroutine is the child of a fork. - bool is_child() const { return value_ < 0; } - - /// Returns true if the coroutine is the parent of a fork. - bool is_parent() const { return !is_child(); } - - /// Returns true if the coroutine has reached its terminal state. - bool is_complete() const { return value_ == -1; } - -private: - friend class detail::coroutine_ref; - int value_; -}; - - -namespace detail { - -class coroutine_ref -{ -public: - coroutine_ref(coroutine& c) : value_(c.value_), modified_(false) {} - coroutine_ref(coroutine* c) : value_(c->value_), modified_(false) {} - ~coroutine_ref() { if (!modified_) value_ = -1; } - operator int() const { return value_; } - int& operator=(int v) { modified_ = true; return value_ = v; } -private: - void operator=(const coroutine_ref&); - int& value_; - bool modified_; -}; - -} // namespace detail -} // namespace asio -} // namespace boost - -#define BOOST_ASIO_CORO_REENTER(c) \ - switch (::boost::asio::detail::coroutine_ref _coro_value = c) \ - case -1: if (_coro_value) \ - { \ - goto terminate_coroutine; \ - terminate_coroutine: \ - _coro_value = -1; \ - goto bail_out_of_coroutine; \ - bail_out_of_coroutine: \ - break; \ - } \ - else /* fall-through */ case 0: - -#define BOOST_ASIO_CORO_YIELD_IMPL(n) \ - for (_coro_value = (n);;) \ - if (_coro_value == 0) \ - { \ - case (n): ; \ - break; \ - } \ - else \ - switch (_coro_value ? 0 : 1) \ - for (;;) \ - /* fall-through */ case -1: if (_coro_value) \ - goto terminate_coroutine; \ - else for (;;) \ - /* fall-through */ case 1: if (_coro_value) \ - goto bail_out_of_coroutine; \ - else /* fall-through */ case 0: - -#define BOOST_ASIO_CORO_FORK_IMPL(n) \ - for (_coro_value = -(n);; _coro_value = (n)) \ - if (_coro_value == (n)) \ - { \ - case -(n): ; \ - break; \ - } \ - else - -#if defined(_MSC_VER) -# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(__COUNTER__ + 1) -# define BOOST_ASIO_CORO_FORK BOOST_ASIO_CORO_FORK_IMPL(__COUNTER__ + 1) -#else // defined(_MSC_VER) -# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(__LINE__) -# define BOOST_ASIO_CORO_FORK BOOST_ASIO_CORO_FORK_IMPL(__LINE__) -#endif // defined(_MSC_VER) - -#endif // BOOST_ASIO_COROUTINE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/datagram_socket_service.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/datagram_socket_service.hpp deleted file mode 100644 index 35bc2f5f..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/datagram_socket_service.hpp +++ /dev/null @@ -1,468 +0,0 @@ -// -// datagram_socket_service.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_DATAGRAM_SOCKET_SERVICE_HPP -#define BOOST_ASIO_DATAGRAM_SOCKET_SERVICE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#include -#include -#include -#include -#include - -#if defined(BOOST_ASIO_WINDOWS_RUNTIME) -# include -#elif defined(BOOST_ASIO_HAS_IOCP) -# include -#else -# include -#endif - -#include - -namespace boost { -namespace asio { - -/// Default service implementation for a datagram socket. -template -class datagram_socket_service -#if defined(GENERATING_DOCUMENTATION) - : public boost::asio::io_context::service -#else - : public boost::asio::detail::service_base > -#endif -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The unique service identifier. - static boost::asio::io_context::id id; -#endif - - /// The protocol type. - typedef Protocol protocol_type; - - /// The endpoint type. - typedef typename Protocol::endpoint endpoint_type; - -private: - // The type of the platform-specific implementation. -#if defined(BOOST_ASIO_WINDOWS_RUNTIME) - typedef detail::null_socket_service service_impl_type; -#elif defined(BOOST_ASIO_HAS_IOCP) - typedef detail::win_iocp_socket_service service_impl_type; -#else - typedef detail::reactive_socket_service service_impl_type; -#endif - -public: - /// The type of a datagram socket. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined implementation_type; -#else - typedef typename service_impl_type::implementation_type implementation_type; -#endif - - /// The native socket type. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined native_handle_type; -#else - typedef typename service_impl_type::native_handle_type native_handle_type; -#endif - - /// Construct a new datagram socket service for the specified io_context. - explicit datagram_socket_service(boost::asio::io_context& io_context) - : boost::asio::detail::service_base< - datagram_socket_service >(io_context), - service_impl_(io_context) - { - } - - /// Construct a new datagram socket implementation. - void construct(implementation_type& impl) - { - service_impl_.construct(impl); - } - -#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move-construct a new datagram socket implementation. - void move_construct(implementation_type& impl, - implementation_type& other_impl) - { - service_impl_.move_construct(impl, other_impl); - } - - /// Move-assign from another datagram socket implementation. - void move_assign(implementation_type& impl, - datagram_socket_service& other_service, - implementation_type& other_impl) - { - service_impl_.move_assign(impl, other_service.service_impl_, other_impl); - } - - // All socket services have access to each other's implementations. - template friend class datagram_socket_service; - - /// Move-construct a new datagram socket implementation from another protocol - /// type. - template - void converting_move_construct(implementation_type& impl, - datagram_socket_service& other_service, - typename datagram_socket_service< - Protocol1>::implementation_type& other_impl, - typename enable_if::value>::type* = 0) - { - service_impl_.template converting_move_construct( - impl, other_service.service_impl_, other_impl); - } -#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Destroy a datagram socket implementation. - void destroy(implementation_type& impl) - { - service_impl_.destroy(impl); - } - - // Open a new datagram socket implementation. - BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl, - const protocol_type& protocol, boost::system::error_code& ec) - { - if (protocol.type() == BOOST_ASIO_OS_DEF(SOCK_DGRAM)) - service_impl_.open(impl, protocol, ec); - else - ec = boost::asio::error::invalid_argument; - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Assign an existing native socket to a datagram socket. - BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl, - const protocol_type& protocol, const native_handle_type& native_socket, - boost::system::error_code& ec) - { - service_impl_.assign(impl, protocol, native_socket, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the socket is open. - bool is_open(const implementation_type& impl) const - { - return service_impl_.is_open(impl); - } - - /// Close a datagram socket implementation. - BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.close(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Release ownership of the underlying socket. - native_handle_type release(implementation_type& impl, - boost::system::error_code& ec) - { - return service_impl_.release(impl, ec); - } - - /// Get the native socket implementation. - native_handle_type native_handle(implementation_type& impl) - { - return service_impl_.native_handle(impl); - } - - /// Cancel all asynchronous operations associated with the socket. - BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.cancel(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the socket is at the out-of-band data mark. - bool at_mark(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.at_mark(impl, ec); - } - - /// Determine the number of bytes available for reading. - std::size_t available(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.available(impl, ec); - } - - // Bind the datagram socket to the specified local endpoint. - BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl, - const endpoint_type& endpoint, boost::system::error_code& ec) - { - service_impl_.bind(impl, endpoint, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Connect the datagram socket to the specified endpoint. - BOOST_ASIO_SYNC_OP_VOID connect(implementation_type& impl, - const endpoint_type& peer_endpoint, boost::system::error_code& ec) - { - service_impl_.connect(impl, peer_endpoint, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Start an asynchronous connect. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler, - void (boost::system::error_code)) - async_connect(implementation_type& impl, - const endpoint_type& peer_endpoint, - BOOST_ASIO_MOVE_ARG(ConnectHandler) handler) - { - async_completion init(handler); - - service_impl_.async_connect(impl, peer_endpoint, init.completion_handler); - - return init.result.get(); - } - - /// Set a socket option. - template - BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl, - const SettableSocketOption& option, boost::system::error_code& ec) - { - service_impl_.set_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get a socket option. - template - BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl, - GettableSocketOption& option, boost::system::error_code& ec) const - { - service_impl_.get_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Perform an IO control command on the socket. - template - BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl, - IoControlCommand& command, boost::system::error_code& ec) - { - service_impl_.io_control(impl, command, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Gets the non-blocking mode of the socket. - bool non_blocking(const implementation_type& impl) const - { - return service_impl_.non_blocking(impl); - } - - /// Sets the non-blocking mode of the socket. - BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl, - bool mode, boost::system::error_code& ec) - { - service_impl_.non_blocking(impl, mode, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Gets the non-blocking mode of the native socket implementation. - bool native_non_blocking(const implementation_type& impl) const - { - return service_impl_.native_non_blocking(impl); - } - - /// Sets the non-blocking mode of the native socket implementation. - BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl, - bool mode, boost::system::error_code& ec) - { - service_impl_.native_non_blocking(impl, mode, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get the local endpoint. - endpoint_type local_endpoint(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.local_endpoint(impl, ec); - } - - /// Get the remote endpoint. - endpoint_type remote_endpoint(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.remote_endpoint(impl, ec); - } - - /// Disable sends or receives on the socket. - BOOST_ASIO_SYNC_OP_VOID shutdown(implementation_type& impl, - socket_base::shutdown_type what, boost::system::error_code& ec) - { - service_impl_.shutdown(impl, what, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Wait for the socket to become ready to read, ready to write, or to have - /// pending error conditions. - BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl, - socket_base::wait_type w, boost::system::error_code& ec) - { - service_impl_.wait(impl, w, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Asynchronously wait for the socket to become ready to read, ready to - /// write, or to have pending error conditions. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler, - void (boost::system::error_code)) - async_wait(implementation_type& impl, socket_base::wait_type w, - BOOST_ASIO_MOVE_ARG(WaitHandler) handler) - { - async_completion init(handler); - - service_impl_.async_wait(impl, w, init.completion_handler); - - return init.result.get(); - } - - /// Send the given data to the peer. - template - std::size_t send(implementation_type& impl, - const ConstBufferSequence& buffers, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.send(impl, buffers, flags, ec); - } - - /// Start an asynchronous send. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_send(implementation_type& impl, const ConstBufferSequence& buffers, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - async_completion init(handler); - - service_impl_.async_send(impl, buffers, flags, init.completion_handler); - - return init.result.get(); - } - - /// Send a datagram to the specified endpoint. - template - std::size_t send_to(implementation_type& impl, - const ConstBufferSequence& buffers, const endpoint_type& destination, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.send_to(impl, buffers, destination, flags, ec); - } - - /// Start an asynchronous send. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_send_to(implementation_type& impl, - const ConstBufferSequence& buffers, const endpoint_type& destination, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - async_completion init(handler); - - service_impl_.async_send_to(impl, buffers, - destination, flags, init.completion_handler); - - return init.result.get(); - } - - /// Receive some data from the peer. - template - std::size_t receive(implementation_type& impl, - const MutableBufferSequence& buffers, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.receive(impl, buffers, flags, ec); - } - - /// Start an asynchronous receive. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_receive(implementation_type& impl, - const MutableBufferSequence& buffers, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - async_completion init(handler); - - service_impl_.async_receive(impl, buffers, flags, init.completion_handler); - - return init.result.get(); - } - - /// Receive a datagram with the endpoint of the sender. - template - std::size_t receive_from(implementation_type& impl, - const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.receive_from(impl, buffers, sender_endpoint, flags, - ec); - } - - /// Start an asynchronous receive that will get the endpoint of the sender. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_receive_from(implementation_type& impl, - const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - async_completion init(handler); - - service_impl_.async_receive_from(impl, buffers, - sender_endpoint, flags, init.completion_handler); - - return init.result.get(); - } - -private: - // Destroy all user-defined handler objects owned by the service. - void shutdown() - { - service_impl_.shutdown(); - } - - // The platform-specific implementation. - service_impl_type service_impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#endif // BOOST_ASIO_DATAGRAM_SOCKET_SERVICE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer.hpp deleted file mode 100644 index f7be6be9..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// -// deadline_timer.hpp -// ~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_DEADLINE_TIMER_HPP -#define BOOST_ASIO_DEADLINE_TIMER_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \ - || defined(GENERATING_DOCUMENTATION) - -#include // Must come before posix_time. -#include - -#include - -namespace boost { -namespace asio { - -/// Typedef for the typical usage of timer. Uses a UTC clock. -typedef basic_deadline_timer deadline_timer; - -} // namespace asio -} // namespace boost - -#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) - // || defined(GENERATING_DOCUMENTATION) - -#endif // BOOST_ASIO_DEADLINE_TIMER_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer_service.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer_service.hpp deleted file mode 100644 index d1098151..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/deadline_timer_service.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// -// deadline_timer_service.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_DEADLINE_TIMER_SERVICE_HPP -#define BOOST_ASIO_DEADLINE_TIMER_SERVICE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \ - || defined(GENERATING_DOCUMENTATION) - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Default service implementation for a timer. -template > -class deadline_timer_service -#if defined(GENERATING_DOCUMENTATION) - : public boost::asio::io_context::service -#else - : public boost::asio::detail::service_base< - deadline_timer_service > -#endif -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The unique service identifier. - static boost::asio::io_context::id id; -#endif - - /// The time traits type. - typedef TimeTraits traits_type; - - /// The time type. - typedef typename traits_type::time_type time_type; - - /// The duration type. - typedef typename traits_type::duration_type duration_type; - -private: - // The type of the platform-specific implementation. - typedef detail::deadline_timer_service service_impl_type; - -public: - /// The implementation type of the deadline timer. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined implementation_type; -#else - typedef typename service_impl_type::implementation_type implementation_type; -#endif - - /// Construct a new timer service for the specified io_context. - explicit deadline_timer_service(boost::asio::io_context& io_context) - : boost::asio::detail::service_base< - deadline_timer_service >(io_context), - service_impl_(io_context) - { - } - - /// Construct a new timer implementation. - void construct(implementation_type& impl) - { - service_impl_.construct(impl); - } - - /// Destroy a timer implementation. - void destroy(implementation_type& impl) - { - service_impl_.destroy(impl); - } - - /// Cancel any asynchronous wait operations associated with the timer. - std::size_t cancel(implementation_type& impl, boost::system::error_code& ec) - { - return service_impl_.cancel(impl, ec); - } - - /// Cancels one asynchronous wait operation associated with the timer. - std::size_t cancel_one(implementation_type& impl, - boost::system::error_code& ec) - { - return service_impl_.cancel_one(impl, ec); - } - - /// Get the expiry time for the timer as an absolute time. - time_type expires_at(const implementation_type& impl) const - { - return service_impl_.expiry(impl); - } - - /// Set the expiry time for the timer as an absolute time. - std::size_t expires_at(implementation_type& impl, - const time_type& expiry_time, boost::system::error_code& ec) - { - return service_impl_.expires_at(impl, expiry_time, ec); - } - - /// Get the expiry time for the timer relative to now. - duration_type expires_from_now(const implementation_type& impl) const - { - return TimeTraits::subtract(service_impl_.expiry(impl), TimeTraits::now()); - } - - /// Set the expiry time for the timer relative to now. - std::size_t expires_from_now(implementation_type& impl, - const duration_type& expiry_time, boost::system::error_code& ec) - { - return service_impl_.expires_after(impl, expiry_time, ec); - } - - // Perform a blocking wait on the timer. - void wait(implementation_type& impl, boost::system::error_code& ec) - { - service_impl_.wait(impl, ec); - } - - // Start an asynchronous wait on the timer. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler, - void (boost::system::error_code)) - async_wait(implementation_type& impl, - BOOST_ASIO_MOVE_ARG(WaitHandler) handler) - { - async_completion init(handler); - - service_impl_.async_wait(impl, init.completion_handler); - - return init.result.get(); - } - -private: - // Destroy all user-defined handler objects owned by the service. - void shutdown() - { - service_impl_.shutdown(); - } - - // The platform-specific implementation. - service_impl_type service_impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) - // || defined(GENERATING_DOCUMENTATION) - -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#endif // BOOST_ASIO_DEADLINE_TIMER_SERVICE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/defer.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/defer.hpp deleted file mode 100644 index 966bfb4e..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/defer.hpp +++ /dev/null @@ -1,109 +0,0 @@ -// -// defer.hpp -// ~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_DEFER_HPP -#define BOOST_ASIO_DEFER_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Submits a completion token or function object for execution. -/** - * This function submits an object for execution using the object's associated - * executor. The function object is queued for execution, and is never called - * from the current thread prior to returning from defer(). - * - * This function has the following effects: - * - * @li Constructs a function object handler of type @c Handler, initialized - * with handler(forward(token)). - * - * @li Constructs an object @c result of type async_result, - * initializing the object as result(handler). - * - * @li Obtains the handler's associated executor object @c ex by performing - * get_associated_executor(handler). - * - * @li Obtains the handler's associated allocator object @c alloc by performing - * get_associated_allocator(handler). - * - * @li Performs ex.defer(std::move(handler), alloc). - * - * @li Returns result.get(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer( - BOOST_ASIO_MOVE_ARG(CompletionToken) token); - -/// Submits a completion token or function object for execution. -/** - * This function submits an object for execution using the specified executor. - * The function object is queued for execution, and is never called from the - * current thread prior to returning from defer(). - * - * This function has the following effects: - * - * @li Constructs a function object handler of type @c Handler, initialized - * with handler(forward(token)). - * - * @li Constructs an object @c result of type async_result, - * initializing the object as result(handler). - * - * @li Obtains the handler's associated executor object @c ex1 by performing - * get_associated_executor(handler). - * - * @li Creates a work object @c w by performing make_work(ex1). - * - * @li Obtains the handler's associated allocator object @c alloc by performing - * get_associated_allocator(handler). - * - * @li Constructs a function object @c f with a function call operator that - * performs ex1.dispatch(std::move(handler), alloc) followed by - * w.reset(). - * - * @li Performs Executor(ex).defer(std::move(f), alloc). - * - * @li Returns result.get(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer( - const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type* = 0); - -/// Submits a completion token or function object for execution. -/** - * @returns defer(ctx.get_executor(), forward(token)). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer( - ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type* = 0); - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif // BOOST_ASIO_DEFER_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/dispatch.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/dispatch.hpp deleted file mode 100644 index c2ea0c89..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/dispatch.hpp +++ /dev/null @@ -1,110 +0,0 @@ -// -// dispatch.hpp -// ~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_DISPATCH_HPP -#define BOOST_ASIO_DISPATCH_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Submits a completion token or function object for execution. -/** - * This function submits an object for execution using the object's associated - * executor. The function object is queued for execution, and is never called - * from the current thread prior to returning from dispatch(). - * - * This function has the following effects: - * - * @li Constructs a function object handler of type @c Handler, initialized - * with handler(forward(token)). - * - * @li Constructs an object @c result of type async_result, - * initializing the object as result(handler). - * - * @li Obtains the handler's associated executor object @c ex by performing - * get_associated_executor(handler). - * - * @li Obtains the handler's associated allocator object @c alloc by performing - * get_associated_allocator(handler). - * - * @li Performs ex.dispatch(std::move(handler), alloc). - * - * @li Returns result.get(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch( - BOOST_ASIO_MOVE_ARG(CompletionToken) token); - -/// Submits a completion token or function object for execution. -/** - * This function submits an object for execution using the specified executor. - * The function object is queued for execution, and is never called from the - * current thread prior to returning from dispatch(). - * - * This function has the following effects: - * - * @li Constructs a function object handler of type @c Handler, initialized - * with handler(forward(token)). - * - * @li Constructs an object @c result of type async_result, - * initializing the object as result(handler). - * - * @li Obtains the handler's associated executor object @c ex1 by performing - * get_associated_executor(handler). - * - * @li Creates a work object @c w by performing make_work(ex1). - * - * @li Obtains the handler's associated allocator object @c alloc by performing - * get_associated_allocator(handler). - * - * @li Constructs a function object @c f with a function call operator that - * performs ex1.dispatch(std::move(handler), alloc) followed by - * w.reset(). - * - * @li Performs Executor(ex).dispatch(std::move(f), alloc). - * - * @li Returns result.get(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch( - const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type* = 0); - -/// Submits a completion token or function object for execution. -/** - * @returns dispatch(ctx.get_executor(), - * forward(token)). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch( - ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type* = 0); - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif // BOOST_ASIO_DISPATCH_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/error.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/error.hpp deleted file mode 100644 index 8f1f74cb..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/error.hpp +++ /dev/null @@ -1,361 +0,0 @@ -// -// error.hpp -// ~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_ERROR_HPP -#define BOOST_ASIO_ERROR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#if defined(BOOST_ASIO_WINDOWS) \ - || defined(__CYGWIN__) \ - || defined(BOOST_ASIO_WINDOWS_RUNTIME) -# include -#else -# include -# include -#endif - -#if defined(GENERATING_DOCUMENTATION) -/// INTERNAL ONLY. -# define BOOST_ASIO_NATIVE_ERROR(e) implementation_defined -/// INTERNAL ONLY. -# define BOOST_ASIO_SOCKET_ERROR(e) implementation_defined -/// INTERNAL ONLY. -# define BOOST_ASIO_NETDB_ERROR(e) implementation_defined -/// INTERNAL ONLY. -# define BOOST_ASIO_GETADDRINFO_ERROR(e) implementation_defined -/// INTERNAL ONLY. -# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) implementation_defined -#elif defined(BOOST_ASIO_WINDOWS_RUNTIME) -# define BOOST_ASIO_NATIVE_ERROR(e) __HRESULT_FROM_WIN32(e) -# define BOOST_ASIO_SOCKET_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e) -# define BOOST_ASIO_NETDB_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e) -# define BOOST_ASIO_GETADDRINFO_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e) -# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win -#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) -# define BOOST_ASIO_NATIVE_ERROR(e) e -# define BOOST_ASIO_SOCKET_ERROR(e) WSA ## e -# define BOOST_ASIO_NETDB_ERROR(e) WSA ## e -# define BOOST_ASIO_GETADDRINFO_ERROR(e) WSA ## e -# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win -#else -# define BOOST_ASIO_NATIVE_ERROR(e) e -# define BOOST_ASIO_SOCKET_ERROR(e) e -# define BOOST_ASIO_NETDB_ERROR(e) e -# define BOOST_ASIO_GETADDRINFO_ERROR(e) e -# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_posix -#endif - -#include - -namespace boost { -namespace asio { -namespace error { - -enum basic_errors -{ - /// Permission denied. - access_denied = BOOST_ASIO_SOCKET_ERROR(EACCES), - - /// Address family not supported by protocol. - address_family_not_supported = BOOST_ASIO_SOCKET_ERROR(EAFNOSUPPORT), - - /// Address already in use. - address_in_use = BOOST_ASIO_SOCKET_ERROR(EADDRINUSE), - - /// Transport endpoint is already connected. - already_connected = BOOST_ASIO_SOCKET_ERROR(EISCONN), - - /// Operation already in progress. - already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY), - - /// Broken pipe. - broken_pipe = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(ERROR_BROKEN_PIPE), - BOOST_ASIO_NATIVE_ERROR(EPIPE)), - - /// A connection has been aborted. - connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED), - - /// Connection refused. - connection_refused = BOOST_ASIO_SOCKET_ERROR(ECONNREFUSED), - - /// Connection reset by peer. - connection_reset = BOOST_ASIO_SOCKET_ERROR(ECONNRESET), - - /// Bad file descriptor. - bad_descriptor = BOOST_ASIO_SOCKET_ERROR(EBADF), - - /// Bad address. - fault = BOOST_ASIO_SOCKET_ERROR(EFAULT), - - /// No route to host. - host_unreachable = BOOST_ASIO_SOCKET_ERROR(EHOSTUNREACH), - - /// Operation now in progress. - in_progress = BOOST_ASIO_SOCKET_ERROR(EINPROGRESS), - - /// Interrupted system call. - interrupted = BOOST_ASIO_SOCKET_ERROR(EINTR), - - /// Invalid argument. - invalid_argument = BOOST_ASIO_SOCKET_ERROR(EINVAL), - - /// Message too long. - message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE), - - /// The name was too long. - name_too_long = BOOST_ASIO_SOCKET_ERROR(ENAMETOOLONG), - - /// Network is down. - network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN), - - /// Network dropped connection on reset. - network_reset = BOOST_ASIO_SOCKET_ERROR(ENETRESET), - - /// Network is unreachable. - network_unreachable = BOOST_ASIO_SOCKET_ERROR(ENETUNREACH), - - /// Too many open files. - no_descriptors = BOOST_ASIO_SOCKET_ERROR(EMFILE), - - /// No buffer space available. - no_buffer_space = BOOST_ASIO_SOCKET_ERROR(ENOBUFS), - - /// Cannot allocate memory. - no_memory = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(ERROR_OUTOFMEMORY), - BOOST_ASIO_NATIVE_ERROR(ENOMEM)), - - /// Operation not permitted. - no_permission = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(ERROR_ACCESS_DENIED), - BOOST_ASIO_NATIVE_ERROR(EPERM)), - - /// Protocol not available. - no_protocol_option = BOOST_ASIO_SOCKET_ERROR(ENOPROTOOPT), - - /// No such device. - no_such_device = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(ERROR_BAD_UNIT), - BOOST_ASIO_NATIVE_ERROR(ENODEV)), - - /// Transport endpoint is not connected. - not_connected = BOOST_ASIO_SOCKET_ERROR(ENOTCONN), - - /// Socket operation on non-socket. - not_socket = BOOST_ASIO_SOCKET_ERROR(ENOTSOCK), - - /// Operation cancelled. - operation_aborted = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(ERROR_OPERATION_ABORTED), - BOOST_ASIO_NATIVE_ERROR(ECANCELED)), - - /// Operation not supported. - operation_not_supported = BOOST_ASIO_SOCKET_ERROR(EOPNOTSUPP), - - /// Cannot send after transport endpoint shutdown. - shut_down = BOOST_ASIO_SOCKET_ERROR(ESHUTDOWN), - - /// Connection timed out. - timed_out = BOOST_ASIO_SOCKET_ERROR(ETIMEDOUT), - - /// Resource temporarily unavailable. - try_again = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(ERROR_RETRY), - BOOST_ASIO_NATIVE_ERROR(EAGAIN)), - - /// The socket is marked non-blocking and the requested operation would block. - would_block = BOOST_ASIO_SOCKET_ERROR(EWOULDBLOCK) -}; - -enum netdb_errors -{ - /// Host not found (authoritative). - host_not_found = BOOST_ASIO_NETDB_ERROR(HOST_NOT_FOUND), - - /// Host not found (non-authoritative). - host_not_found_try_again = BOOST_ASIO_NETDB_ERROR(TRY_AGAIN), - - /// The query is valid but does not have associated address data. - no_data = BOOST_ASIO_NETDB_ERROR(NO_DATA), - - /// A non-recoverable error occurred. - no_recovery = BOOST_ASIO_NETDB_ERROR(NO_RECOVERY) -}; - -enum addrinfo_errors -{ - /// The service is not supported for the given socket type. - service_not_found = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(WSATYPE_NOT_FOUND), - BOOST_ASIO_GETADDRINFO_ERROR(EAI_SERVICE)), - - /// The socket type is not supported. - socket_type_not_supported = BOOST_ASIO_WIN_OR_POSIX( - BOOST_ASIO_NATIVE_ERROR(WSAESOCKTNOSUPPORT), - BOOST_ASIO_GETADDRINFO_ERROR(EAI_SOCKTYPE)) -}; - -enum misc_errors -{ - /// Already open. - already_open = 1, - - /// End of file or stream. - eof, - - /// Element not found. - not_found, - - /// The descriptor cannot fit into the select system call's fd_set. - fd_set_failure -}; - -inline const boost::system::error_category& get_system_category() -{ - return boost::system::system_category(); -} - -#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) - -extern BOOST_ASIO_DECL -const boost::system::error_category& get_netdb_category(); - -extern BOOST_ASIO_DECL -const boost::system::error_category& get_addrinfo_category(); - -#else // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) - -inline const boost::system::error_category& get_netdb_category() -{ - return get_system_category(); -} - -inline const boost::system::error_category& get_addrinfo_category() -{ - return get_system_category(); -} - -#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) - -extern BOOST_ASIO_DECL -const boost::system::error_category& get_misc_category(); - -static const boost::system::error_category& - system_category BOOST_ASIO_UNUSED_VARIABLE - = boost::asio::error::get_system_category(); -static const boost::system::error_category& - netdb_category BOOST_ASIO_UNUSED_VARIABLE - = boost::asio::error::get_netdb_category(); -static const boost::system::error_category& - addrinfo_category BOOST_ASIO_UNUSED_VARIABLE - = boost::asio::error::get_addrinfo_category(); -static const boost::system::error_category& - misc_category BOOST_ASIO_UNUSED_VARIABLE - = boost::asio::error::get_misc_category(); - -} // namespace error -} // namespace asio -} // namespace boost - -namespace boost { -namespace system { - -template<> struct is_error_code_enum -{ - static const bool value = true; -}; - -template<> struct is_error_code_enum -{ - static const bool value = true; -}; - -template<> struct is_error_code_enum -{ - static const bool value = true; -}; - -template<> struct is_error_code_enum -{ - static const bool value = true; -}; - -} // namespace system -} // namespace boost - -namespace boost { -namespace asio { -namespace error { - -inline boost::system::error_code make_error_code(basic_errors e) -{ - return boost::system::error_code( - static_cast(e), get_system_category()); -} - -inline boost::system::error_code make_error_code(netdb_errors e) -{ - return boost::system::error_code( - static_cast(e), get_netdb_category()); -} - -inline boost::system::error_code make_error_code(addrinfo_errors e) -{ - return boost::system::error_code( - static_cast(e), get_addrinfo_category()); -} - -inline boost::system::error_code make_error_code(misc_errors e) -{ - return boost::system::error_code( - static_cast(e), get_misc_category()); -} - -} // namespace error -namespace stream_errc { - // Simulates the proposed stream_errc scoped enum. - using error::eof; - using error::not_found; -} // namespace stream_errc -namespace socket_errc { - // Simulates the proposed socket_errc scoped enum. - using error::already_open; - using error::not_found; -} // namespace socket_errc -namespace resolver_errc { - // Simulates the proposed resolver_errc scoped enum. - using error::host_not_found; - const error::netdb_errors try_again = error::host_not_found_try_again; - using error::service_not_found; -} // namespace resolver_errc -} // namespace asio -} // namespace boost - -#include - -#undef BOOST_ASIO_NATIVE_ERROR -#undef BOOST_ASIO_SOCKET_ERROR -#undef BOOST_ASIO_NETDB_ERROR -#undef BOOST_ASIO_GETADDRINFO_ERROR -#undef BOOST_ASIO_WIN_OR_POSIX - -#if defined(BOOST_ASIO_HEADER_ONLY) -# include -#endif // defined(BOOST_ASIO_HEADER_ONLY) - -#endif // BOOST_ASIO_ERROR_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/execution_context.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/execution_context.hpp deleted file mode 100644 index 9feb30c4..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/execution_context.hpp +++ /dev/null @@ -1,413 +0,0 @@ -// -// execution_context.hpp -// ~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_EXECUTION_CONTEXT_HPP -#define BOOST_ASIO_EXECUTION_CONTEXT_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -class execution_context; -class io_context; - -#if !defined(GENERATING_DOCUMENTATION) -template Service& use_service(execution_context&); -template Service& use_service(io_context&); -template void add_service(execution_context&, Service*); -template bool has_service(execution_context&); -#endif // !defined(GENERATING_DOCUMENTATION) - -namespace detail { class service_registry; } - -/// A context for function object execution. -/** - * An execution context represents a place where function objects will be - * executed. An @c io_context is an example of an execution context. - * - * @par The execution_context class and services - * - * Class execution_context implements an extensible, type-safe, polymorphic set - * of services, indexed by service type. - * - * Services exist to manage the resources that are shared across an execution - * context. For example, timers may be implemented in terms of a single timer - * queue, and this queue would be stored in a service. - * - * Access to the services of an execution_context is via three function - * templates, use_service(), add_service() and has_service(). - * - * In a call to @c use_service(), the type argument chooses a service, - * making available all members of the named type. If @c Service is not present - * in an execution_context, an object of type @c Service is created and added - * to the execution_context. A C++ program can check if an execution_context - * implements a particular service with the function template @c - * has_service(). - * - * Service objects may be explicitly added to an execution_context using the - * function template @c add_service(). If the @c Service is already - * present, the service_already_exists exception is thrown. If the owner of the - * service is not the same object as the execution_context parameter, the - * invalid_service_owner exception is thrown. - * - * Once a service reference is obtained from an execution_context object by - * calling use_service(), that reference remains usable as long as the owning - * execution_context object exists. - * - * All service implementations have execution_context::service as a public base - * class. Custom services may be implemented by deriving from this class and - * then added to an execution_context using the facilities described above. - * - * @par The execution_context as a base class - * - * Class execution_context may be used only as a base class for concrete - * execution context types. The @c io_context is an example of such a derived - * type. - * - * On destruction, a class that is derived from execution_context must perform - * execution_context::shutdown() followed by - * execution_context::destroy(). - * - * This destruction sequence permits programs to simplify their resource - * management by using @c shared_ptr<>. Where an object's lifetime is tied to - * the lifetime of a connection (or some other sequence of asynchronous - * operations), a @c shared_ptr to the object would be bound into the handlers - * for all asynchronous operations associated with it. This works as follows: - * - * @li When a single connection ends, all associated asynchronous operations - * complete. The corresponding handler objects are destroyed, and all @c - * shared_ptr references to the objects are destroyed. - * - * @li To shut down the whole program, the io_context function stop() is called - * to terminate any run() calls as soon as possible. The io_context destructor - * calls @c shutdown() and @c destroy() to destroy all pending handlers, - * causing all @c shared_ptr references to all connection objects to be - * destroyed. - */ -class execution_context - : private noncopyable -{ -public: - class id; - class service; - -protected: - /// Constructor. - BOOST_ASIO_DECL execution_context(); - - /// Destructor. - BOOST_ASIO_DECL ~execution_context(); - - /// Shuts down all services in the context. - /** - * This function is implemented as follows: - * - * @li For each service object @c svc in the execution_context set, in - * reverse order of the beginning of service object lifetime, performs @c - * svc->shutdown(). - */ - BOOST_ASIO_DECL void shutdown(); - - /// Destroys all services in the context. - /** - * This function is implemented as follows: - * - * @li For each service object @c svc in the execution_context set, in - * reverse order * of the beginning of service object lifetime, performs - * delete static_cast(svc). - */ - BOOST_ASIO_DECL void destroy(); - -public: - /// Fork-related event notifications. - enum fork_event - { - /// Notify the context that the process is about to fork. - fork_prepare, - - /// Notify the context that the process has forked and is the parent. - fork_parent, - - /// Notify the context that the process has forked and is the child. - fork_child - }; - - /// Notify the execution_context of a fork-related event. - /** - * This function is used to inform the execution_context that the process is - * about to fork, or has just forked. This allows the execution_context, and - * the services it contains, to perform any necessary housekeeping to ensure - * correct operation following a fork. - * - * This function must not be called while any other execution_context - * function, or any function associated with the execution_context's derived - * class, is being called in another thread. It is, however, safe to call - * this function from within a completion handler, provided no other thread - * is accessing the execution_context or its derived class. - * - * @param event A fork-related event. - * - * @throws boost::system::system_error Thrown on failure. If the notification - * fails the execution_context object should no longer be used and should be - * destroyed. - * - * @par Example - * The following code illustrates how to incorporate the notify_fork() - * function: - * @code my_execution_context.notify_fork(execution_context::fork_prepare); - * if (fork() == 0) - * { - * // This is the child process. - * my_execution_context.notify_fork(execution_context::fork_child); - * } - * else - * { - * // This is the parent process. - * my_execution_context.notify_fork(execution_context::fork_parent); - * } @endcode - * - * @note For each service object @c svc in the execution_context set, - * performs svc->notify_fork();. When processing the fork_prepare - * event, services are visited in reverse order of the beginning of service - * object lifetime. Otherwise, services are visited in order of the beginning - * of service object lifetime. - */ - BOOST_ASIO_DECL void notify_fork(fork_event event); - - /// Obtain the service object corresponding to the given type. - /** - * This function is used to locate a service object that corresponds to the - * given service type. If there is no existing implementation of the service, - * then the execution_context will create a new instance of the service. - * - * @param e The execution_context object that owns the service. - * - * @return The service interface implementing the specified service type. - * Ownership of the service interface is not transferred to the caller. - */ - template - friend Service& use_service(execution_context& e); - - /// Obtain the service object corresponding to the given type. - /** - * This function is used to locate a service object that corresponds to the - * given service type. If there is no existing implementation of the service, - * then the io_context will create a new instance of the service. - * - * @param ioc The io_context object that owns the service. - * - * @return The service interface implementing the specified service type. - * Ownership of the service interface is not transferred to the caller. - * - * @note This overload is preserved for backwards compatibility with services - * that inherit from io_context::service. - */ - template - friend Service& use_service(io_context& ioc); - -#if defined(GENERATING_DOCUMENTATION) - - /// Creates a service object and adds it to the execution_context. - /** - * This function is used to add a service to the execution_context. - * - * @param e The execution_context object that owns the service. - * - * @param args Zero or more arguments to be passed to the service - * constructor. - * - * @throws boost::asio::service_already_exists Thrown if a service of the - * given type is already present in the execution_context. - */ - template - friend Service& make_service(execution_context& e, Args&&... args); - -#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) - - template - friend Service& make_service(execution_context& e, - BOOST_ASIO_MOVE_ARG(Args)... args); - -#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) - - template - friend Service& make_service(execution_context& e); - -#define BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \ - template \ - friend Service& make_service(execution_context& e, \ - BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)); \ - /**/ - BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF) -#undef BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF - -#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) - - /// (Deprecated: Use make_service().) Add a service object to the - /// execution_context. - /** - * This function is used to add a service to the execution_context. - * - * @param e The execution_context object that owns the service. - * - * @param svc The service object. On success, ownership of the service object - * is transferred to the execution_context. When the execution_context object - * is destroyed, it will destroy the service object by performing: @code - * delete static_cast(svc) @endcode - * - * @throws boost::asio::service_already_exists Thrown if a service of the - * given type is already present in the execution_context. - * - * @throws boost::asio::invalid_service_owner Thrown if the service's owning - * execution_context is not the execution_context object specified by the - * @c e parameter. - */ - template - friend void add_service(execution_context& e, Service* svc); - - /// Determine if an execution_context contains a specified service type. - /** - * This function is used to determine whether the execution_context contains a - * service object corresponding to the given service type. - * - * @param e The execution_context object that owns the service. - * - * @return A boolean indicating whether the execution_context contains the - * service. - */ - template - friend bool has_service(execution_context& e); - -private: - // The service registry. - boost::asio::detail::service_registry* service_registry_; -}; - -/// Class used to uniquely identify a service. -class execution_context::id - : private noncopyable -{ -public: - /// Constructor. - id() {} -}; - -/// Base class for all io_context services. -class execution_context::service - : private noncopyable -{ -public: - /// Get the context object that owns the service. - execution_context& context(); - -protected: - /// Constructor. - /** - * @param owner The execution_context object that owns the service. - */ - BOOST_ASIO_DECL service(execution_context& owner); - - /// Destructor. - BOOST_ASIO_DECL virtual ~service(); - -private: - /// Destroy all user-defined handler objects owned by the service. - virtual void shutdown() = 0; - - /// Handle notification of a fork-related event to perform any necessary - /// housekeeping. - /** - * This function is not a pure virtual so that services only have to - * implement it if necessary. The default implementation does nothing. - */ - BOOST_ASIO_DECL virtual void notify_fork( - execution_context::fork_event event); - - friend class boost::asio::detail::service_registry; - struct key - { - key() : type_info_(0), id_(0) {} - const std::type_info* type_info_; - const execution_context::id* id_; - } key_; - - execution_context& owner_; - service* next_; -}; - -/// Exception thrown when trying to add a duplicate service to an -/// execution_context. -class service_already_exists - : public std::logic_error -{ -public: - BOOST_ASIO_DECL service_already_exists(); -}; - -/// Exception thrown when trying to add a service object to an -/// execution_context where the service has a different owner. -class invalid_service_owner - : public std::logic_error -{ -public: - BOOST_ASIO_DECL invalid_service_owner(); -}; - -namespace detail { - -// Special derived service id type to keep classes header-file only. -template -class service_id - : public execution_context::id -{ -}; - -// Special service base class to keep classes header-file only. -template -class execution_context_service_base - : public execution_context::service -{ -public: - static service_id id; - - // Constructor. - execution_context_service_base(execution_context& e) - : execution_context::service(e) - { - } -}; - -template -service_id execution_context_service_base::id; - -} // namespace detail -} // namespace asio -} // namespace boost - -#include - -#include -#if defined(BOOST_ASIO_HEADER_ONLY) -# include -#endif // defined(BOOST_ASIO_HEADER_ONLY) - -#endif // BOOST_ASIO_EXECUTION_CONTEXT_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor.hpp deleted file mode 100644 index f5198423..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor.hpp +++ /dev/null @@ -1,343 +0,0 @@ -// -// executor.hpp -// ~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_EXECUTOR_HPP -#define BOOST_ASIO_EXECUTOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Exception thrown when trying to access an empty polymorphic executor. -class bad_executor - : public std::exception -{ -public: - /// Constructor. - BOOST_ASIO_DECL bad_executor() BOOST_ASIO_NOEXCEPT; - - /// Obtain message associated with exception. - BOOST_ASIO_DECL virtual const char* what() const - BOOST_ASIO_NOEXCEPT_OR_NOTHROW; -}; - -/// Polymorphic wrapper for executors. -class executor -{ -public: - /// Default constructor. - executor() BOOST_ASIO_NOEXCEPT - : impl_(0) - { - } - - /// Construct from nullptr. - executor(nullptr_t) BOOST_ASIO_NOEXCEPT - : impl_(0) - { - } - - /// Copy constructor. - executor(const executor& other) BOOST_ASIO_NOEXCEPT - : impl_(other.clone()) - { - } - -#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move constructor. - executor(executor&& other) BOOST_ASIO_NOEXCEPT - : impl_(other.impl_) - { - other.impl_ = 0; - } -#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Construct a polymorphic wrapper for the specified executor. - template - executor(Executor e); - - /// Allocator-aware constructor to create a polymorphic wrapper for the - /// specified executor. - template - executor(allocator_arg_t, const Allocator& a, Executor e); - - /// Destructor. - ~executor() - { - destroy(); - } - - /// Assignment operator. - executor& operator=(const executor& other) BOOST_ASIO_NOEXCEPT - { - destroy(); - impl_ = other.clone(); - return *this; - } - -#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - // Move assignment operator. - executor& operator=(executor&& other) BOOST_ASIO_NOEXCEPT - { - destroy(); - impl_ = other.impl_; - other.impl_ = 0; - return *this; - } -#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Assignment operator for nullptr_t. - executor& operator=(nullptr_t) BOOST_ASIO_NOEXCEPT - { - destroy(); - impl_ = 0; - return *this; - } - - /// Assignment operator to create a polymorphic wrapper for the specified - /// executor. - template - executor& operator=(BOOST_ASIO_MOVE_ARG(Executor) e) BOOST_ASIO_NOEXCEPT - { - executor tmp(BOOST_ASIO_MOVE_CAST(Executor)(e)); - destroy(); - impl_ = tmp.impl_; - tmp.impl_ = 0; - return *this; - } - - /// Obtain the underlying execution context. - execution_context& context() const BOOST_ASIO_NOEXCEPT - { - return get_impl()->context(); - } - - /// Inform the executor that it has some outstanding work to do. - void on_work_started() const BOOST_ASIO_NOEXCEPT - { - get_impl()->on_work_started(); - } - - /// Inform the executor that some work is no longer outstanding. - void on_work_finished() const BOOST_ASIO_NOEXCEPT - { - get_impl()->on_work_finished(); - } - - /// Request the executor to invoke the given function object. - /** - * This function is used to ask the executor to execute the given function - * object. The function object is executed according to the rules of the - * target executor object. - * - * @param f The function object to be called. The executor will make a copy - * of the handler object as required. The function signature of the function - * object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void dispatch(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; - - /// Request the executor to invoke the given function object. - /** - * This function is used to ask the executor to execute the given function - * object. The function object is executed according to the rules of the - * target executor object. - * - * @param f The function object to be called. The executor will make - * a copy of the handler object as required. The function signature of the - * function object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void post(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; - - /// Request the executor to invoke the given function object. - /** - * This function is used to ask the executor to execute the given function - * object. The function object is executed according to the rules of the - * target executor object. - * - * @param f The function object to be called. The executor will make - * a copy of the handler object as required. The function signature of the - * function object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; - - struct unspecified_bool_type_t {}; - typedef void (*unspecified_bool_type)(unspecified_bool_type_t); - static void unspecified_bool_true(unspecified_bool_type_t) {} - - /// Operator to test if the executor contains a valid target. - operator unspecified_bool_type() const BOOST_ASIO_NOEXCEPT - { - return impl_ ? &executor::unspecified_bool_true : 0; - } - - /// Obtain type information for the target executor object. - /** - * @returns If @c *this has a target type of type @c T, typeid(T); - * otherwise, typeid(void). - */ -#if !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION) - const std::type_info& target_type() const BOOST_ASIO_NOEXCEPT - { - return impl_ ? impl_->target_type() : typeid(void); - } -#else // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION) - const void* target_type() const BOOST_ASIO_NOEXCEPT - { - return impl_ ? impl_->target_type() : 0; - } -#endif // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION) - - /// Obtain a pointer to the target executor object. - /** - * @returns If target_type() == typeid(T), a pointer to the stored - * executor target; otherwise, a null pointer. - */ - template - Executor* target() BOOST_ASIO_NOEXCEPT; - - /// Obtain a pointer to the target executor object. - /** - * @returns If target_type() == typeid(T), a pointer to the stored - * executor target; otherwise, a null pointer. - */ - template - const Executor* target() const BOOST_ASIO_NOEXCEPT; - - /// Compare two executors for equality. - friend bool operator==(const executor& a, - const executor& b) BOOST_ASIO_NOEXCEPT - { - if (a.impl_ == b.impl_) - return true; - if (!a.impl_ || !b.impl_) - return false; - return a.impl_->equals(b.impl_); - } - - /// Compare two executors for inequality. - friend bool operator!=(const executor& a, - const executor& b) BOOST_ASIO_NOEXCEPT - { - return !(a == b); - } - -private: -#if !defined(GENERATING_DOCUMENTATION) - class function; - template class impl; - -#if !defined(BOOST_ASIO_NO_TYPEID) - typedef const std::type_info& type_id_result_type; -#else // !defined(BOOST_ASIO_NO_TYPEID) - typedef const void* type_id_result_type; -#endif // !defined(BOOST_ASIO_NO_TYPEID) - - template - static type_id_result_type type_id() - { -#if !defined(BOOST_ASIO_NO_TYPEID) - return typeid(T); -#else // !defined(BOOST_ASIO_NO_TYPEID) - static int unique_id; - return &unique_id; -#endif // !defined(BOOST_ASIO_NO_TYPEID) - } - - // Base class for all polymorphic executor implementations. - class impl_base - { - public: - virtual impl_base* clone() const BOOST_ASIO_NOEXCEPT = 0; - virtual void destroy() BOOST_ASIO_NOEXCEPT = 0; - virtual execution_context& context() BOOST_ASIO_NOEXCEPT = 0; - virtual void on_work_started() BOOST_ASIO_NOEXCEPT = 0; - virtual void on_work_finished() BOOST_ASIO_NOEXCEPT = 0; - virtual void dispatch(BOOST_ASIO_MOVE_ARG(function)) = 0; - virtual void post(BOOST_ASIO_MOVE_ARG(function)) = 0; - virtual void defer(BOOST_ASIO_MOVE_ARG(function)) = 0; - virtual type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT = 0; - virtual void* target() BOOST_ASIO_NOEXCEPT = 0; - virtual const void* target() const BOOST_ASIO_NOEXCEPT = 0; - virtual bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT = 0; - - protected: - impl_base(bool fast_dispatch) : fast_dispatch_(fast_dispatch) {} - virtual ~impl_base() {} - - private: - friend class executor; - const bool fast_dispatch_; - }; - - // Helper function to check and return the implementation pointer. - impl_base* get_impl() const - { - if (!impl_) - { - bad_executor ex; - boost::asio::detail::throw_exception(ex); - } - return impl_; - } - - // Helper function to clone another implementation. - impl_base* clone() const BOOST_ASIO_NOEXCEPT - { - return impl_ ? impl_->clone() : 0; - } - - // Helper function to destroy an implementation. - void destroy() BOOST_ASIO_NOEXCEPT - { - if (impl_) - impl_->destroy(); - } - - impl_base* impl_; -#endif // !defined(GENERATING_DOCUMENTATION) -}; - -} // namespace asio -} // namespace boost - -BOOST_ASIO_USES_ALLOCATOR(boost::asio::executor) - -#include - -#include -#if defined(BOOST_ASIO_HEADER_ONLY) -# include -#endif // defined(BOOST_ASIO_HEADER_ONLY) - -#endif // BOOST_ASIO_EXECUTOR_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor_work_guard.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor_work_guard.hpp deleted file mode 100644 index a5e2276b..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/executor_work_guard.hpp +++ /dev/null @@ -1,171 +0,0 @@ -// -// executor_work_guard.hpp -// ~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_EXECUTOR_WORK_GUARD_HPP -#define BOOST_ASIO_EXECUTOR_WORK_GUARD_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// An object of type @c executor_work_guard controls ownership of executor work -/// within a scope. -template -class executor_work_guard -{ -public: - /// The underlying executor type. - typedef Executor executor_type; - - /// Constructs a @c executor_work_guard object for the specified executor. - /** - * Stores a copy of @c e and calls on_work_started() on it. - */ - explicit executor_work_guard(const executor_type& e) BOOST_ASIO_NOEXCEPT - : executor_(e), - owns_(true) - { - executor_.on_work_started(); - } - - /// Copy constructor. - executor_work_guard(const executor_work_guard& other) BOOST_ASIO_NOEXCEPT - : executor_(other.executor_), - owns_(other.owns_) - { - if (owns_) - executor_.on_work_started(); - } - -#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move constructor. - executor_work_guard(executor_work_guard&& other) - : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)), - owns_(other.owns_) - { - other.owns_ = false; - } -#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Destructor. - /** - * Unless the object has already been reset, or is in a moved-from state, - * calls on_work_finished() on the stored executor. - */ - ~executor_work_guard() - { - if (owns_) - executor_.on_work_finished(); - } - - /// Obtain the associated executor. - executor_type get_executor() const BOOST_ASIO_NOEXCEPT - { - return executor_; - } - - /// Whether the executor_work_guard object owns some outstanding work. - bool owns_work() const BOOST_ASIO_NOEXCEPT - { - return owns_; - } - - /// Indicate that the work is no longer outstanding. - /* - * Unless the object has already been reset, or is in a moved-from state, - * calls on_work_finished() on the stored executor. - */ - void reset() BOOST_ASIO_NOEXCEPT - { - if (owns_) - { - executor_.on_work_finished(); - owns_ = false; - } - } - -private: - // Disallow assignment. - executor_work_guard& operator=(const executor_work_guard&); - - executor_type executor_; - bool owns_; -}; - -/// Create an @ref executor_work_guard object. -template -inline executor_work_guard make_work_guard(const Executor& ex, - typename enable_if::value>::type* = 0) -{ - return executor_work_guard(ex); -} - -/// Create an @ref executor_work_guard object. -template -inline executor_work_guard -make_work_guard(ExecutionContext& ctx, - typename enable_if< - is_convertible::value>::type* = 0) -{ - return executor_work_guard( - ctx.get_executor()); -} - -/// Create an @ref executor_work_guard object. -template -inline executor_work_guard::type> -make_work_guard(const T& t, - typename enable_if::value && - !is_convertible::value>::type* = 0) -{ - return executor_work_guard::type>( - associated_executor::get(t)); -} - -/// Create an @ref executor_work_guard object. -template -inline executor_work_guard::type> -make_work_guard(const T& t, const Executor& ex, - typename enable_if::value>::type* = 0) -{ - return executor_work_guard::type>( - associated_executor::get(t, ex)); -} - -/// Create an @ref executor_work_guard object. -template -inline executor_work_guard::type> -make_work_guard(const T& t, ExecutionContext& ctx, - typename enable_if::value && - !is_convertible::value>::type* = 0) -{ - return executor_work_guard::type>( - associated_executor::get( - t, ctx.get_executor())); -} - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_EXECUTOR_WORK_GUARD_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_alloc_hook.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_alloc_hook.hpp deleted file mode 100644 index 84071d03..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_alloc_hook.hpp +++ /dev/null @@ -1,83 +0,0 @@ -// -// handler_alloc_hook.hpp -// ~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_HANDLER_ALLOC_HOOK_HPP -#define BOOST_ASIO_HANDLER_ALLOC_HOOK_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Default allocation function for handlers. -/** - * Asynchronous operations may need to allocate temporary objects. Since - * asynchronous operations have a handler function object, these temporary - * objects can be said to be associated with the handler. - * - * Implement asio_handler_allocate and asio_handler_deallocate for your own - * handlers to provide custom allocation for these temporary objects. - * - * The default implementation of these allocation hooks uses ::operator - * new and ::operator delete. - * - * @note All temporary objects associated with a handler will be deallocated - * before the upcall to the handler is performed. This allows the same memory to - * be reused for a subsequent asynchronous operation initiated by the handler. - * - * @par Example - * @code - * class my_handler; - * - * void* asio_handler_allocate(std::size_t size, my_handler* context) - * { - * return ::operator new(size); - * } - * - * void asio_handler_deallocate(void* pointer, std::size_t size, - * my_handler* context) - * { - * ::operator delete(pointer); - * } - * @endcode - */ -BOOST_ASIO_DECL void* asio_handler_allocate( - std::size_t size, ...); - -/// Default deallocation function for handlers. -/** - * Implement asio_handler_allocate and asio_handler_deallocate for your own - * handlers to provide custom allocation for the associated temporary objects. - * - * The default implementation of these allocation hooks uses ::operator - * new and ::operator delete. - * - * @sa asio_handler_allocate. - */ -BOOST_ASIO_DECL void asio_handler_deallocate( - void* pointer, std::size_t size, ...); - -} // namespace asio -} // namespace boost - -#include - -#if defined(BOOST_ASIO_HEADER_ONLY) -# include -#endif // defined(BOOST_ASIO_HEADER_ONLY) - -#endif // BOOST_ASIO_HANDLER_ALLOC_HOOK_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_continuation_hook.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_continuation_hook.hpp deleted file mode 100644 index da516bc2..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_continuation_hook.hpp +++ /dev/null @@ -1,56 +0,0 @@ -// -// handler_continuation_hook.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP -#define BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#include - -namespace boost { -namespace asio { - -/// Default continuation function for handlers. -/** - * Asynchronous operations may represent a continuation of the asynchronous - * control flow associated with the current handler. The implementation can use - * this knowledge to optimise scheduling of the handler. - * - * Implement asio_handler_is_continuation for your own handlers to indicate - * when a handler represents a continuation. - * - * The default implementation of the continuation hook returns false. - * - * @par Example - * @code - * class my_handler; - * - * bool asio_handler_is_continuation(my_handler* context) - * { - * return true; - * } - * @endcode - */ -inline bool asio_handler_is_continuation(...) -{ - return false; -} - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_invoke_hook.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_invoke_hook.hpp deleted file mode 100644 index f698c2f8..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_invoke_hook.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// -// handler_invoke_hook.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_HANDLER_INVOKE_HOOK_HPP -#define BOOST_ASIO_HANDLER_INVOKE_HOOK_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#include - -namespace boost { -namespace asio { - -/** @defgroup asio_handler_invoke boost::asio::asio_handler_invoke - * - * @brief Default invoke function for handlers. - * - * Completion handlers for asynchronous operations are invoked by the - * io_context associated with the corresponding object (e.g. a socket or - * deadline_timer). Certain guarantees are made on when the handler may be - * invoked, in particular that a handler can only be invoked from a thread that - * is currently calling @c run() on the corresponding io_context object. - * Handlers may subsequently be invoked through other objects (such as - * io_context::strand objects) that provide additional guarantees. - * - * When asynchronous operations are composed from other asynchronous - * operations, all intermediate handlers should be invoked using the same - * method as the final handler. This is required to ensure that user-defined - * objects are not accessed in a way that may violate the guarantees. This - * hooking function ensures that the invoked method used for the final handler - * is accessible at each intermediate step. - * - * Implement asio_handler_invoke for your own handlers to specify a custom - * invocation strategy. - * - * This default implementation invokes the function object like so: - * @code function(); @endcode - * If necessary, the default implementation makes a copy of the function object - * so that the non-const operator() can be used. - * - * @par Example - * @code - * class my_handler; - * - * template - * void asio_handler_invoke(Function function, my_handler* context) - * { - * context->strand_.dispatch(function); - * } - * @endcode - */ -/*@{*/ - -/// Default handler invocation hook used for non-const function objects. -template -inline void asio_handler_invoke(Function& function, ...) -{ - function(); -} - -/// Default handler invocation hook used for const function objects. -template -inline void asio_handler_invoke(const Function& function, ...) -{ - Function tmp(function); - tmp(); -} - -/*@}*/ - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_HANDLER_INVOKE_HOOK_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_type.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_type.hpp deleted file mode 100644 index 97187574..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/handler_type.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// -// handler_type.hpp -// ~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_HANDLER_TYPE_HPP -#define BOOST_ASIO_HANDLER_TYPE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include - -#include - -namespace boost { -namespace asio { - -/// (Deprecated: Use two-parameter version of async_result.) Default handler -/// type traits provided for all completion token types. -/** - * The handler_type traits class is used for determining the concrete handler - * type to be used for an asynchronous operation. It allows the handler type to - * be determined at the point where the specific completion handler signature - * is known. - * - * This template may be specialised for user-defined completion token types. - */ -template -struct handler_type -{ - /// The handler type for the specific signature. - typedef typename conditional< - is_same::type>::value, - decay, - handler_type::type, Signature> - >::type::type type; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_HANDLER_TYPE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/high_resolution_timer.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/high_resolution_timer.hpp deleted file mode 100644 index 3cd57714..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/high_resolution_timer.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// -// high_resolution_timer.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_HIGH_RESOLUTION_TIMER_HPP -#define BOOST_ASIO_HIGH_RESOLUTION_TIMER_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) - -#include -#include - -namespace boost { -namespace asio { - -/// Typedef for a timer based on the high resolution clock. -/** - * This typedef uses the C++11 @c <chrono> standard library facility, if - * available. Otherwise, it may use the Boost.Chrono library. To explicitly - * utilise Boost.Chrono, use the basic_waitable_timer template directly: - * @code - * typedef basic_waitable_timer timer; - * @endcode - */ -typedef basic_waitable_timer< - chrono::high_resolution_clock> - high_resolution_timer; - -} // namespace asio -} // namespace boost - -#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) - -#endif // BOOST_ASIO_HIGH_RESOLUTION_TIMER_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context.hpp deleted file mode 100644 index 2eb3c462..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context.hpp +++ /dev/null @@ -1,878 +0,0 @@ -// -// io_context.hpp -// ~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_IO_CONTEXT_HPP -#define BOOST_ASIO_IO_CONTEXT_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(BOOST_ASIO_HAS_CHRONO) -# include -#endif // defined(BOOST_ASIO_HAS_CHRONO) - -#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) -# include -#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \ - || defined(__osf__) -# include -#endif - -#include - -namespace boost { -namespace asio { - -namespace detail { -#if defined(BOOST_ASIO_HAS_IOCP) - typedef class win_iocp_io_context io_context_impl; - class win_iocp_overlapped_ptr; -#else - typedef class scheduler io_context_impl; -#endif -} // namespace detail - -/// Provides core I/O functionality. -/** - * The io_context class provides the core I/O functionality for users of the - * asynchronous I/O objects, including: - * - * @li boost::asio::ip::tcp::socket - * @li boost::asio::ip::tcp::acceptor - * @li boost::asio::ip::udp::socket - * @li boost::asio::deadline_timer. - * - * The io_context class also includes facilities intended for developers of - * custom asynchronous services. - * - * @par Thread Safety - * @e Distinct @e objects: Safe.@n - * @e Shared @e objects: Safe, with the specific exceptions of the restart() - * and notify_fork() functions. Calling restart() while there are unfinished - * run(), run_one(), run_for(), run_until(), poll() or poll_one() calls results - * in undefined behaviour. The notify_fork() function should not be called - * while any io_context function, or any function on an I/O object that is - * associated with the io_context, is being called in another thread. - * - * @par Concepts: - * Dispatcher. - * - * @par Synchronous and asynchronous operations - * - * Synchronous operations on I/O objects implicitly run the io_context object - * for an individual operation. The io_context functions run(), run_one(), - * run_for(), run_until(), poll() or poll_one() must be called for the - * io_context to perform asynchronous operations on behalf of a C++ program. - * Notification that an asynchronous operation has completed is delivered by - * invocation of the associated handler. Handlers are invoked only by a thread - * that is currently calling any overload of run(), run_one(), run_for(), - * run_until(), poll() or poll_one() for the io_context. - * - * @par Effect of exceptions thrown from handlers - * - * If an exception is thrown from a handler, the exception is allowed to - * propagate through the throwing thread's invocation of run(), run_one(), - * run_for(), run_until(), poll() or poll_one(). No other threads that are - * calling any of these functions are affected. It is then the responsibility - * of the application to catch the exception. - * - * After the exception has been caught, the run(), run_one(), run_for(), - * run_until(), poll() or poll_one() call may be restarted @em without the need - * for an intervening call to restart(). This allows the thread to rejoin the - * io_context object's thread pool without impacting any other threads in the - * pool. - * - * For example: - * - * @code - * boost::asio::io_context io_context; - * ... - * for (;;) - * { - * try - * { - * io_context.run(); - * break; // run() exited normally - * } - * catch (my_exception& e) - * { - * // Deal with exception as appropriate. - * } - * } - * @endcode - * - * @par Submitting arbitrary tasks to the io_context - * - * To submit functions to the io_context, use the @ref boost::asio::dispatch, - * @ref boost::asio::post or @ref boost::asio::defer free functions. - * - * For example: - * - * @code void my_task() - * { - * ... - * } - * - * ... - * - * boost::asio::io_context io_context; - * - * // Submit a function to the io_context. - * boost::asio::post(io_context, my_task); - * - * // Submit a lambda object to the io_context. - * boost::asio::post(io_context, - * []() - * { - * ... - * }); - * - * // Run the io_context until it runs out of work. - * io_context.run(); @endcode - * - * @par Stopping the io_context from running out of work - * - * Some applications may need to prevent an io_context object's run() call from - * returning when there is no more work to do. For example, the io_context may - * be being run in a background thread that is launched prior to the - * application's asynchronous operations. The run() call may be kept running by - * creating an object of type - * boost::asio::executor_work_guard: - * - * @code boost::asio::io_context io_context; - * boost::asio::executor_work_guard - * = boost::asio::make_work_guard(io_context); - * ... @endcode - * - * To effect a shutdown, the application will then need to call the io_context - * object's stop() member function. This will cause the io_context run() call - * to return as soon as possible, abandoning unfinished operations and without - * permitting ready handlers to be dispatched. - * - * Alternatively, if the application requires that all operations and handlers - * be allowed to finish normally, the work object may be explicitly reset. - * - * @code boost::asio::io_context io_context; - * boost::asio::executor_work_guard - * = boost::asio::make_work_guard(io_context); - * ... - * work.reset(); // Allow run() to exit. @endcode - */ -class io_context - : public execution_context -{ -private: - typedef detail::io_context_impl impl_type; -#if defined(BOOST_ASIO_HAS_IOCP) - friend class detail::win_iocp_overlapped_ptr; -#endif - -public: - class executor_type; - friend class executor_type; - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - class work; - friend class work; -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - class service; - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) - class strand; -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - - /// The type used to count the number of handlers executed by the context. - typedef std::size_t count_type; - - /// Constructor. - BOOST_ASIO_DECL io_context(); - - /// Constructor. - /** - * Construct with a hint about the required level of concurrency. - * - * @param concurrency_hint A suggestion to the implementation on how many - * threads it should allow to run simultaneously. - */ - BOOST_ASIO_DECL explicit io_context(int concurrency_hint); - - /// Destructor. - /** - * On destruction, the io_context performs the following sequence of - * operations: - * - * @li For each service object @c svc in the io_context set, in reverse order - * of the beginning of service object lifetime, performs - * @c svc->shutdown(). - * - * @li Uninvoked handler objects that were scheduled for deferred invocation - * on the io_context, or any associated strand, are destroyed. - * - * @li For each service object @c svc in the io_context set, in reverse order - * of the beginning of service object lifetime, performs - * delete static_cast(svc). - * - * @note The destruction sequence described above permits programs to - * simplify their resource management by using @c shared_ptr<>. Where an - * object's lifetime is tied to the lifetime of a connection (or some other - * sequence of asynchronous operations), a @c shared_ptr to the object would - * be bound into the handlers for all asynchronous operations associated with - * it. This works as follows: - * - * @li When a single connection ends, all associated asynchronous operations - * complete. The corresponding handler objects are destroyed, and all - * @c shared_ptr references to the objects are destroyed. - * - * @li To shut down the whole program, the io_context function stop() is - * called to terminate any run() calls as soon as possible. The io_context - * destructor defined above destroys all handlers, causing all @c shared_ptr - * references to all connection objects to be destroyed. - */ - BOOST_ASIO_DECL ~io_context(); - - /// Obtains the executor associated with the io_context. - executor_type get_executor() BOOST_ASIO_NOEXCEPT; - - /// Run the io_context object's event processing loop. - /** - * The run() function blocks until all work has finished and there are no - * more handlers to be dispatched, or until the io_context has been stopped. - * - * Multiple threads may call the run() function to set up a pool of threads - * from which the io_context may execute handlers. All threads that are - * waiting in the pool are equivalent and the io_context may choose any one - * of them to invoke a handler. - * - * A normal exit from the run() function implies that the io_context object - * is stopped (the stopped() function returns @c true). Subsequent calls to - * run(), run_one(), poll() or poll_one() will return immediately unless there - * is a prior call to restart(). - * - * @return The number of handlers that were executed. - * - * @note Calling the run() function from a thread that is currently calling - * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on - * the same io_context object may introduce the potential for deadlock. It is - * the caller's reponsibility to avoid this. - * - * The poll() function may also be used to dispatch ready handlers, but - * without blocking. - */ - BOOST_ASIO_DECL count_type run(); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use non-error_code overload.) Run the io_context object's - /// event processing loop. - /** - * The run() function blocks until all work has finished and there are no - * more handlers to be dispatched, or until the io_context has been stopped. - * - * Multiple threads may call the run() function to set up a pool of threads - * from which the io_context may execute handlers. All threads that are - * waiting in the pool are equivalent and the io_context may choose any one - * of them to invoke a handler. - * - * A normal exit from the run() function implies that the io_context object - * is stopped (the stopped() function returns @c true). Subsequent calls to - * run(), run_one(), poll() or poll_one() will return immediately unless there - * is a prior call to restart(). - * - * @param ec Set to indicate what error occurred, if any. - * - * @return The number of handlers that were executed. - * - * @note Calling the run() function from a thread that is currently calling - * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on - * the same io_context object may introduce the potential for deadlock. It is - * the caller's reponsibility to avoid this. - * - * The poll() function may also be used to dispatch ready handlers, but - * without blocking. - */ - BOOST_ASIO_DECL count_type run(boost::system::error_code& ec); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) - /// Run the io_context object's event processing loop for a specified - /// duration. - /** - * The run_for() function blocks until all work has finished and there are no - * more handlers to be dispatched, until the io_context has been stopped, or - * until the specified duration has elapsed. - * - * @param rel_time The duration for which the call may block. - * - * @return The number of handlers that were executed. - */ - template - std::size_t run_for(const chrono::duration& rel_time); - - /// Run the io_context object's event processing loop until a specified time. - /** - * The run_until() function blocks until all work has finished and there are - * no more handlers to be dispatched, until the io_context has been stopped, - * or until the specified time has been reached. - * - * @param abs_time The time point until which the call may block. - * - * @return The number of handlers that were executed. - */ - template - std::size_t run_until(const chrono::time_point& abs_time); -#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) - - /// Run the io_context object's event processing loop to execute at most one - /// handler. - /** - * The run_one() function blocks until one handler has been dispatched, or - * until the io_context has been stopped. - * - * @return The number of handlers that were executed. A zero return value - * implies that the io_context object is stopped (the stopped() function - * returns @c true). Subsequent calls to run(), run_one(), poll() or - * poll_one() will return immediately unless there is a prior call to - * restart(). - * - * @note Calling the run_one() function from a thread that is currently - * calling one of run(), run_one(), run_for(), run_until(), poll() or - * poll_one() on the same io_context object may introduce the potential for - * deadlock. It is the caller's reponsibility to avoid this. - */ - BOOST_ASIO_DECL count_type run_one(); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use non-error_code overlaod.) Run the io_context object's - /// event processing loop to execute at most one handler. - /** - * The run_one() function blocks until one handler has been dispatched, or - * until the io_context has been stopped. - * - * @return The number of handlers that were executed. A zero return value - * implies that the io_context object is stopped (the stopped() function - * returns @c true). Subsequent calls to run(), run_one(), poll() or - * poll_one() will return immediately unless there is a prior call to - * restart(). - * - * @return The number of handlers that were executed. - * - * @note Calling the run_one() function from a thread that is currently - * calling one of run(), run_one(), run_for(), run_until(), poll() or - * poll_one() on the same io_context object may introduce the potential for - * deadlock. It is the caller's reponsibility to avoid this. - */ - BOOST_ASIO_DECL count_type run_one(boost::system::error_code& ec); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) - /// Run the io_context object's event processing loop for a specified duration - /// to execute at most one handler. - /** - * The run_one_for() function blocks until one handler has been dispatched, - * until the io_context has been stopped, or until the specified duration has - * elapsed. - * - * @param rel_time The duration for which the call may block. - * - * @return The number of handlers that were executed. - */ - template - std::size_t run_one_for(const chrono::duration& rel_time); - - /// Run the io_context object's event processing loop until a specified time - /// to execute at most one handler. - /** - * The run_one_until() function blocks until one handler has been dispatched, - * until the io_context has been stopped, or until the specified time has - * been reached. - * - * @param abs_time The time point until which the call may block. - * - * @return The number of handlers that were executed. - */ - template - std::size_t run_one_until( - const chrono::time_point& abs_time); -#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) - - /// Run the io_context object's event processing loop to execute ready - /// handlers. - /** - * The poll() function runs handlers that are ready to run, without blocking, - * until the io_context has been stopped or there are no more ready handlers. - * - * @return The number of handlers that were executed. - */ - BOOST_ASIO_DECL count_type poll(); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use non-error_code overload.) Run the io_context object's - /// event processing loop to execute ready handlers. - /** - * The poll() function runs handlers that are ready to run, without blocking, - * until the io_context has been stopped or there are no more ready handlers. - * - * @param ec Set to indicate what error occurred, if any. - * - * @return The number of handlers that were executed. - */ - BOOST_ASIO_DECL count_type poll(boost::system::error_code& ec); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Run the io_context object's event processing loop to execute one ready - /// handler. - /** - * The poll_one() function runs at most one handler that is ready to run, - * without blocking. - * - * @return The number of handlers that were executed. - */ - BOOST_ASIO_DECL count_type poll_one(); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use non-error_code overload.) Run the io_context object's - /// event processing loop to execute one ready handler. - /** - * The poll_one() function runs at most one handler that is ready to run, - * without blocking. - * - * @param ec Set to indicate what error occurred, if any. - * - * @return The number of handlers that were executed. - */ - BOOST_ASIO_DECL count_type poll_one(boost::system::error_code& ec); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Stop the io_context object's event processing loop. - /** - * This function does not block, but instead simply signals the io_context to - * stop. All invocations of its run() or run_one() member functions should - * return as soon as possible. Subsequent calls to run(), run_one(), poll() - * or poll_one() will return immediately until restart() is called. - */ - BOOST_ASIO_DECL void stop(); - - /// Determine whether the io_context object has been stopped. - /** - * This function is used to determine whether an io_context object has been - * stopped, either through an explicit call to stop(), or due to running out - * of work. When an io_context object is stopped, calls to run(), run_one(), - * poll() or poll_one() will return immediately without invoking any - * handlers. - * - * @return @c true if the io_context object is stopped, otherwise @c false. - */ - BOOST_ASIO_DECL bool stopped() const; - - /// Restart the io_context in preparation for a subsequent run() invocation. - /** - * This function must be called prior to any second or later set of - * invocations of the run(), run_one(), poll() or poll_one() functions when a - * previous invocation of these functions returned due to the io_context - * being stopped or running out of work. After a call to restart(), the - * io_context object's stopped() function will return @c false. - * - * This function must not be called while there are any unfinished calls to - * the run(), run_one(), poll() or poll_one() functions. - */ - BOOST_ASIO_DECL void restart(); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use restart().) Reset the io_context in preparation for a - /// subsequent run() invocation. - /** - * This function must be called prior to any second or later set of - * invocations of the run(), run_one(), poll() or poll_one() functions when a - * previous invocation of these functions returned due to the io_context - * being stopped or running out of work. After a call to restart(), the - * io_context object's stopped() function will return @c false. - * - * This function must not be called while there are any unfinished calls to - * the run(), run_one(), poll() or poll_one() functions. - */ - void reset(); - - /// (Deprecated: Use boost::asio::dispatch().) Request the io_context to - /// invoke the given handler. - /** - * This function is used to ask the io_context to execute the given handler. - * - * The io_context guarantees that the handler will only be called in a thread - * in which the run(), run_one(), poll() or poll_one() member functions is - * currently being invoked. The handler may be executed inside this function - * if the guarantee can be met. - * - * @param handler The handler to be called. The io_context will make - * a copy of the handler object as required. The function signature of the - * handler must be: @code void handler(); @endcode - * - * @note This function throws an exception only if: - * - * @li the handler's @c asio_handler_allocate function; or - * - * @li the handler's copy constructor - * - * throws an exception. - */ - template - BOOST_ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ()) - dispatch(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler); - - /// (Deprecated: Use boost::asio::post().) Request the io_context to invoke - /// the given handler and return immediately. - /** - * This function is used to ask the io_context to execute the given handler, - * but without allowing the io_context to call the handler from inside this - * function. - * - * The io_context guarantees that the handler will only be called in a thread - * in which the run(), run_one(), poll() or poll_one() member functions is - * currently being invoked. - * - * @param handler The handler to be called. The io_context will make - * a copy of the handler object as required. The function signature of the - * handler must be: @code void handler(); @endcode - * - * @note This function throws an exception only if: - * - * @li the handler's @c asio_handler_allocate function; or - * - * @li the handler's copy constructor - * - * throws an exception. - */ - template - BOOST_ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ()) - post(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler); - - /// (Deprecated: Use boost::asio::bind_executor().) Create a new handler that - /// automatically dispatches the wrapped handler on the io_context. - /** - * This function is used to create a new handler function object that, when - * invoked, will automatically pass the wrapped handler to the io_context - * object's dispatch function. - * - * @param handler The handler to be wrapped. The io_context will make a copy - * of the handler object as required. The function signature of the handler - * must be: @code void handler(A1 a1, ... An an); @endcode - * - * @return A function object that, when invoked, passes the wrapped handler to - * the io_context object's dispatch function. Given a function object with the - * signature: - * @code R f(A1 a1, ... An an); @endcode - * If this function object is passed to the wrap function like so: - * @code io_context.wrap(f); @endcode - * then the return value is a function object with the signature - * @code void g(A1 a1, ... An an); @endcode - * that, when invoked, executes code equivalent to: - * @code io_context.dispatch(boost::bind(f, a1, ... an)); @endcode - */ - template -#if defined(GENERATING_DOCUMENTATION) - unspecified -#else - detail::wrapped_handler -#endif - wrap(Handler handler); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -private: - // Helper function to add the implementation. - BOOST_ASIO_DECL impl_type& add_impl(impl_type* impl); - - // Backwards compatible overload for use with services derived from - // io_context::service. - template - friend Service& use_service(io_context& ioc); - -#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) - detail::winsock_init<> init_; -#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \ - || defined(__osf__) - detail::signal_init<> init_; -#endif - - // The implementation. - impl_type& impl_; -}; - -/// Executor used to submit functions to an io_context. -class io_context::executor_type -{ -public: - /// Obtain the underlying execution context. - io_context& context() const BOOST_ASIO_NOEXCEPT; - - /// Inform the io_context that it has some outstanding work to do. - /** - * This function is used to inform the io_context that some work has begun. - * This ensures that the io_context's run() and run_one() functions do not - * exit while the work is underway. - */ - void on_work_started() const BOOST_ASIO_NOEXCEPT; - - /// Inform the io_context that some work is no longer outstanding. - /** - * This function is used to inform the io_context that some work has - * finished. Once the count of unfinished work reaches zero, the io_context - * is stopped and the run() and run_one() functions may exit. - */ - void on_work_finished() const BOOST_ASIO_NOEXCEPT; - - /// Request the io_context to invoke the given function object. - /** - * This function is used to ask the io_context to execute the given function - * object. If the current thread is running the io_context, @c dispatch() - * executes the function before returning. Otherwise, the function will be - * scheduled to run on the io_context. - * - * @param f The function object to be called. The executor will make a copy - * of the handler object as required. The function signature of the function - * object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void dispatch(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; - - /// Request the io_context to invoke the given function object. - /** - * This function is used to ask the io_context to execute the given function - * object. The function object will never be executed inside @c post(). - * Instead, it will be scheduled to run on the io_context. - * - * @param f The function object to be called. The executor will make a copy - * of the handler object as required. The function signature of the function - * object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void post(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; - - /// Request the io_context to invoke the given function object. - /** - * This function is used to ask the io_context to execute the given function - * object. The function object will never be executed inside @c defer(). - * Instead, it will be scheduled to run on the io_context. - * - * If the current thread belongs to the io_context, @c defer() will delay - * scheduling the function object until the current thread returns control to - * the pool. - * - * @param f The function object to be called. The executor will make a copy - * of the handler object as required. The function signature of the function - * object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; - - /// Determine whether the io_context is running in the current thread. - /** - * @return @c true if the current thread is running the io_context. Otherwise - * returns @c false. - */ - bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT; - - /// Compare two executors for equality. - /** - * Two executors are equal if they refer to the same underlying io_context. - */ - friend bool operator==(const executor_type& a, - const executor_type& b) BOOST_ASIO_NOEXCEPT - { - return &a.io_context_ == &b.io_context_; - } - - /// Compare two executors for inequality. - /** - * Two executors are equal if they refer to the same underlying io_context. - */ - friend bool operator!=(const executor_type& a, - const executor_type& b) BOOST_ASIO_NOEXCEPT - { - return &a.io_context_ != &b.io_context_; - } - -private: - friend class io_context; - - // Constructor. - explicit executor_type(io_context& i) : io_context_(i) {} - - // The underlying io_context. - io_context& io_context_; -}; - -#if !defined(BOOST_ASIO_NO_DEPRECATED) -/// (Deprecated: Use executor_work_guard.) Class to inform the io_context when -/// it has work to do. -/** - * The work class is used to inform the io_context when work starts and - * finishes. This ensures that the io_context object's run() function will not - * exit while work is underway, and that it does exit when there is no - * unfinished work remaining. - * - * The work class is copy-constructible so that it may be used as a data member - * in a handler class. It is not assignable. - */ -class io_context::work -{ -public: - /// Constructor notifies the io_context that work is starting. - /** - * The constructor is used to inform the io_context that some work has begun. - * This ensures that the io_context object's run() function will not exit - * while the work is underway. - */ - explicit work(boost::asio::io_context& io_context); - - /// Copy constructor notifies the io_context that work is starting. - /** - * The constructor is used to inform the io_context that some work has begun. - * This ensures that the io_context object's run() function will not exit - * while the work is underway. - */ - work(const work& other); - - /// Destructor notifies the io_context that the work is complete. - /** - * The destructor is used to inform the io_context that some work has - * finished. Once the count of unfinished work reaches zero, the io_context - * object's run() function is permitted to exit. - */ - ~work(); - - /// Get the io_context associated with the work. - boost::asio::io_context& get_io_context(); - - /// (Deprecated: Use get_io_context().) Get the io_context associated with the - /// work. - boost::asio::io_context& get_io_service(); - -private: - // Prevent assignment. - void operator=(const work& other); - - // The io_context implementation. - detail::io_context_impl& io_context_impl_; -}; -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -/// Base class for all io_context services. -class io_context::service - : public execution_context::service -{ -public: - /// Get the io_context object that owns the service. - boost::asio::io_context& get_io_context(); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// Get the io_context object that owns the service. - boost::asio::io_context& get_io_service(); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -private: - /// Destroy all user-defined handler objects owned by the service. - BOOST_ASIO_DECL virtual void shutdown(); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use shutdown().) Destroy all user-defined handler objects - /// owned by the service. - BOOST_ASIO_DECL virtual void shutdown_service(); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Handle notification of a fork-related event to perform any necessary - /// housekeeping. - /** - * This function is not a pure virtual so that services only have to - * implement it if necessary. The default implementation does nothing. - */ - BOOST_ASIO_DECL virtual void notify_fork( - execution_context::fork_event event); - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use notify_fork().) Handle notification of a fork-related - /// event to perform any necessary housekeeping. - /** - * This function is not a pure virtual so that services only have to - * implement it if necessary. The default implementation does nothing. - */ - BOOST_ASIO_DECL virtual void fork_service( - execution_context::fork_event event); -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -protected: - /// Constructor. - /** - * @param owner The io_context object that owns the service. - */ - BOOST_ASIO_DECL service(boost::asio::io_context& owner); - - /// Destructor. - BOOST_ASIO_DECL virtual ~service(); -}; - -namespace detail { - -// Special service base class to keep classes header-file only. -template -class service_base - : public boost::asio::io_context::service -{ -public: - static boost::asio::detail::service_id id; - - // Constructor. - service_base(boost::asio::io_context& io_context) - : boost::asio::io_context::service(io_context) - { - } -}; - -template -boost::asio::detail::service_id service_base::id; - -} // namespace detail -} // namespace asio -} // namespace boost - -#include - -#include -#if defined(BOOST_ASIO_HEADER_ONLY) -# include -#endif // defined(BOOST_ASIO_HEADER_ONLY) - -// If both io_context.hpp and strand.hpp have been included, automatically -// include the header file needed for the io_context::strand class. -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -# if defined(BOOST_ASIO_STRAND_HPP) -# include -# endif // defined(BOOST_ASIO_STRAND_HPP) -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -#endif // BOOST_ASIO_IO_CONTEXT_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context_strand.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context_strand.hpp deleted file mode 100644 index 2190a7b7..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_context_strand.hpp +++ /dev/null @@ -1,384 +0,0 @@ -// -// io_context_strand.hpp -// ~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_IO_CONTEXT_STRAND_HPP -#define BOOST_ASIO_IO_CONTEXT_STRAND_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Provides serialised handler execution. -/** - * The io_context::strand class provides the ability to post and dispatch - * handlers with the guarantee that none of those handlers will execute - * concurrently. - * - * @par Order of handler invocation - * Given: - * - * @li a strand object @c s - * - * @li an object @c a meeting completion handler requirements - * - * @li an object @c a1 which is an arbitrary copy of @c a made by the - * implementation - * - * @li an object @c b meeting completion handler requirements - * - * @li an object @c b1 which is an arbitrary copy of @c b made by the - * implementation - * - * if any of the following conditions are true: - * - * @li @c s.post(a) happens-before @c s.post(b) - * - * @li @c s.post(a) happens-before @c s.dispatch(b), where the latter is - * performed outside the strand - * - * @li @c s.dispatch(a) happens-before @c s.post(b), where the former is - * performed outside the strand - * - * @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are - * performed outside the strand - * - * then @c asio_handler_invoke(a1, &a1) happens-before - * @c asio_handler_invoke(b1, &b1). - * - * Note that in the following case: - * @code async_op_1(..., s.wrap(a)); - * async_op_2(..., s.wrap(b)); @endcode - * the completion of the first async operation will perform @c s.dispatch(a), - * and the second will perform @c s.dispatch(b), but the order in which those - * are performed is unspecified. That is, you cannot state whether one - * happens-before the other. Therefore none of the above conditions are met and - * no ordering guarantee is made. - * - * @note The implementation makes no guarantee that handlers posted or - * dispatched through different @c strand objects will be invoked concurrently. - * - * @par Thread Safety - * @e Distinct @e objects: Safe.@n - * @e Shared @e objects: Safe. - * - * @par Concepts: - * Dispatcher. - */ -class io_context::strand -{ -public: - /// Constructor. - /** - * Constructs the strand. - * - * @param io_context The io_context object that the strand will use to - * dispatch handlers that are ready to be run. - */ - explicit strand(boost::asio::io_context& io_context) - : service_(boost::asio::use_service< - boost::asio::detail::strand_service>(io_context)) - { - service_.construct(impl_); - } - - /// Destructor. - /** - * Destroys a strand. - * - * Handlers posted through the strand that have not yet been invoked will - * still be dispatched in a way that meets the guarantee of non-concurrency. - */ - ~strand() - { - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use context().) Get the io_context associated with the - /// strand. - /** - * This function may be used to obtain the io_context object that the strand - * uses to dispatch handlers for asynchronous operations. - * - * @return A reference to the io_context object that the strand will use to - * dispatch handlers. Ownership is not transferred to the caller. - */ - boost::asio::io_context& get_io_context() - { - return service_.get_io_context(); - } - - /// (Deprecated: Use context().) Get the io_context associated with the - /// strand. - /** - * This function may be used to obtain the io_context object that the strand - * uses to dispatch handlers for asynchronous operations. - * - * @return A reference to the io_context object that the strand will use to - * dispatch handlers. Ownership is not transferred to the caller. - */ - boost::asio::io_context& get_io_service() - { - return service_.get_io_context(); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Obtain the underlying execution context. - boost::asio::io_context& context() const BOOST_ASIO_NOEXCEPT - { - return service_.get_io_context(); - } - - /// Inform the strand that it has some outstanding work to do. - /** - * The strand delegates this call to its underlying io_context. - */ - void on_work_started() const BOOST_ASIO_NOEXCEPT - { - context().get_executor().on_work_started(); - } - - /// Inform the strand that some work is no longer outstanding. - /** - * The strand delegates this call to its underlying io_context. - */ - void on_work_finished() const BOOST_ASIO_NOEXCEPT - { - context().get_executor().on_work_finished(); - } - - /// Request the strand to invoke the given function object. - /** - * This function is used to ask the strand to execute the given function - * object on its underlying io_context. The function object will be executed - * inside this function if the strand is not otherwise busy and if the - * underlying io_context's executor's @c dispatch() function is also able to - * execute the function before returning. - * - * @param f The function object to be called. The executor will make - * a copy of the handler object as required. The function signature of the - * function object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void dispatch(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const - { - typename decay::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f)); - service_.dispatch(impl_, tmp); - (void)a; - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use boost::asio::dispatch().) Request the strand to invoke - /// the given handler. - /** - * This function is used to ask the strand to execute the given handler. - * - * The strand object guarantees that handlers posted or dispatched through - * the strand will not be executed concurrently. The handler may be executed - * inside this function if the guarantee can be met. If this function is - * called from within a handler that was posted or dispatched through the same - * strand, then the new handler will be executed immediately. - * - * The strand's guarantee is in addition to the guarantee provided by the - * underlying io_context. The io_context guarantees that the handler will only - * be called in a thread in which the io_context's run member function is - * currently being invoked. - * - * @param handler The handler to be called. The strand will make a copy of the - * handler object as required. The function signature of the handler must be: - * @code void handler(); @endcode - */ - template - BOOST_ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ()) - dispatch(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler) - { - // If you get an error on the following line it means that your handler does - // not meet the documented type requirements for a CompletionHandler. - BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check; - - async_completion init(handler); - - service_.dispatch(impl_, init.completion_handler); - - return init.result.get(); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Request the strand to invoke the given function object. - /** - * This function is used to ask the executor to execute the given function - * object. The function object will never be executed inside this function. - * Instead, it will be scheduled to run by the underlying io_context. - * - * @param f The function object to be called. The executor will make - * a copy of the handler object as required. The function signature of the - * function object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void post(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const - { - typename decay::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f)); - service_.post(impl_, tmp); - (void)a; - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use boost::asio::post().) Request the strand to invoke the - /// given handler and return immediately. - /** - * This function is used to ask the strand to execute the given handler, but - * without allowing the strand to call the handler from inside this function. - * - * The strand object guarantees that handlers posted or dispatched through - * the strand will not be executed concurrently. The strand's guarantee is in - * addition to the guarantee provided by the underlying io_context. The - * io_context guarantees that the handler will only be called in a thread in - * which the io_context's run member function is currently being invoked. - * - * @param handler The handler to be called. The strand will make a copy of the - * handler object as required. The function signature of the handler must be: - * @code void handler(); @endcode - */ - template - BOOST_ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ()) - post(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler) - { - // If you get an error on the following line it means that your handler does - // not meet the documented type requirements for a CompletionHandler. - BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check; - - async_completion init(handler); - - service_.post(impl_, init.completion_handler); - - return init.result.get(); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Request the strand to invoke the given function object. - /** - * This function is used to ask the executor to execute the given function - * object. The function object will never be executed inside this function. - * Instead, it will be scheduled to run by the underlying io_context. - * - * @param f The function object to be called. The executor will make - * a copy of the handler object as required. The function signature of the - * function object must be: @code void function(); @endcode - * - * @param a An allocator that may be used by the executor to allocate the - * internal storage needed for function invocation. - */ - template - void defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const - { - typename decay::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f)); - service_.post(impl_, tmp); - (void)a; - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use boost::asio::bind_executor().) Create a new handler that - /// automatically dispatches the wrapped handler on the strand. - /** - * This function is used to create a new handler function object that, when - * invoked, will automatically pass the wrapped handler to the strand's - * dispatch function. - * - * @param handler The handler to be wrapped. The strand will make a copy of - * the handler object as required. The function signature of the handler must - * be: @code void handler(A1 a1, ... An an); @endcode - * - * @return A function object that, when invoked, passes the wrapped handler to - * the strand's dispatch function. Given a function object with the signature: - * @code R f(A1 a1, ... An an); @endcode - * If this function object is passed to the wrap function like so: - * @code strand.wrap(f); @endcode - * then the return value is a function object with the signature - * @code void g(A1 a1, ... An an); @endcode - * that, when invoked, executes code equivalent to: - * @code strand.dispatch(boost::bind(f, a1, ... an)); @endcode - */ - template -#if defined(GENERATING_DOCUMENTATION) - unspecified -#else - detail::wrapped_handler -#endif - wrap(Handler handler) - { - return detail::wrapped_handler(*this, handler); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Determine whether the strand is running in the current thread. - /** - * @return @c true if the current thread is executing a handler that was - * submitted to the strand using post(), dispatch() or wrap(). Otherwise - * returns @c false. - */ - bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT - { - return service_.running_in_this_thread(impl_); - } - - /// Compare two strands for equality. - /** - * Two strands are equal if they refer to the same ordered, non-concurrent - * state. - */ - friend bool operator==(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT - { - return a.impl_ == b.impl_; - } - - /// Compare two strands for inequality. - /** - * Two strands are equal if they refer to the same ordered, non-concurrent - * state. - */ - friend bool operator!=(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT - { - return a.impl_ != b.impl_; - } - -private: - boost::asio::detail::strand_service& service_; - mutable boost::asio::detail::strand_service::implementation_type impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -#endif // BOOST_ASIO_IO_CONTEXT_STRAND_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service.hpp deleted file mode 100644 index b04424dd..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// io_service.hpp -// ~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_IO_SERVICE_HPP -#define BOOST_ASIO_IO_SERVICE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#include - -namespace boost { -namespace asio { - -#if !defined(BOOST_ASIO_NO_DEPRECATED) -/// Typedef for backwards compatibility. -typedef io_context io_service; -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_IO_SERVICE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service_strand.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service_strand.hpp deleted file mode 100644 index af7224a5..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/io_service_strand.hpp +++ /dev/null @@ -1,20 +0,0 @@ -// -// io_service_strand.hpp -// ~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_IO_SERVICE_STRAND_HPP -#define BOOST_ASIO_IO_SERVICE_STRAND_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#endif // BOOST_ASIO_IO_SERVICE_STRAND_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_executor.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_executor.hpp deleted file mode 100644 index 4983c538..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_executor.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// -// is_executor.hpp -// ~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_IS_EXECUTOR_HPP -#define BOOST_ASIO_IS_EXECUTOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include - -#include - -namespace boost { -namespace asio { - -/// The is_executor trait detects whether a type T meets the Executor type -/// requirements. -/** - * Class template @c is_executor is a UnaryTypeTrait that is derived from @c - * true_type if the type @c T meets the syntactic requirements for Executor, - * otherwise @c false_type. - */ -template -struct is_executor -#if defined(GENERATING_DOCUMENTATION) - : integral_constant -#else // defined(GENERATING_DOCUMENTATION) - : boost::asio::detail::is_executor -#endif // defined(GENERATING_DOCUMENTATION) -{ -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_IS_EXECUTOR_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_read_buffered.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_read_buffered.hpp deleted file mode 100644 index c2d45a0a..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_read_buffered.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// -// is_read_buffered.hpp -// ~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_IS_READ_BUFFERED_HPP -#define BOOST_ASIO_IS_READ_BUFFERED_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -namespace detail { - -template -char is_read_buffered_helper(buffered_stream* s); - -template -char is_read_buffered_helper(buffered_read_stream* s); - -struct is_read_buffered_big_type { char data[10]; }; -is_read_buffered_big_type is_read_buffered_helper(...); - -} // namespace detail - -/// The is_read_buffered class is a traits class that may be used to determine -/// whether a stream type supports buffering of read data. -template -class is_read_buffered -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The value member is true only if the Stream type supports buffering of - /// read data. - static const bool value; -#else - BOOST_ASIO_STATIC_CONSTANT(bool, - value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1); -#endif -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_IS_READ_BUFFERED_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_write_buffered.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_write_buffered.hpp deleted file mode 100644 index 1f462cd6..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/is_write_buffered.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// -// is_write_buffered.hpp -// ~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_IS_WRITE_BUFFERED_HPP -#define BOOST_ASIO_IS_WRITE_BUFFERED_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -namespace detail { - -template -char is_write_buffered_helper(buffered_stream* s); - -template -char is_write_buffered_helper(buffered_write_stream* s); - -struct is_write_buffered_big_type { char data[10]; }; -is_write_buffered_big_type is_write_buffered_helper(...); - -} // namespace detail - -/// The is_write_buffered class is a traits class that may be used to determine -/// whether a stream type supports buffering of written data. -template -class is_write_buffered -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The value member is true only if the Stream type supports buffering of - /// written data. - static const bool value; -#else - BOOST_ASIO_STATIC_CONSTANT(bool, - value = sizeof(detail::is_write_buffered_helper((Stream*)0)) == 1); -#endif -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_IS_WRITE_BUFFERED_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/packaged_task.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/packaged_task.hpp deleted file mode 100644 index 586de13b..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/packaged_task.hpp +++ /dev/null @@ -1,128 +0,0 @@ -// -// packaged_task.hpp -// ~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_PACKAGED_TASK_HPP -#define BOOST_ASIO_PACKAGED_TASK_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_HAS_STD_FUTURE) \ - || defined(GENERATING_DOCUMENTATION) - -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) \ - || defined(GENERATING_DOCUMENTATION) - -/// Partial specialisation of @c async_result for @c std::packaged_task. -template -class async_result, Signature> -{ -public: - /// The packaged task is the concrete completion handler type. - typedef std::packaged_task completion_handler_type; - - /// The return type of the initiating function is the future obtained from - /// the packaged task. - typedef std::future return_type; - - /// The constructor extracts the future from the packaged task. - explicit async_result(completion_handler_type& h) - : future_(h.get_future()) - { - } - - /// Returns the packaged task's future. - return_type get() - { - return std::move(future_); - } - -private: - return_type future_; -}; - -#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) - // || defined(GENERATING_DOCUMENTATION) - -template -struct async_result, Signature> -{ - typedef std::packaged_task completion_handler_type; - typedef std::future return_type; - - explicit async_result(completion_handler_type& h) - : future_(h.get_future()) - { - } - - return_type get() - { - return std::move(future_); - } - -private: - return_type future_; -}; - -#define BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \ - template \ - class async_result< \ - std::packaged_task, Signature> \ - { \ - public: \ - typedef std::packaged_task< \ - Result(BOOST_ASIO_VARIADIC_TARGS(n))> \ - completion_handler_type; \ - \ - typedef std::future return_type; \ - \ - explicit async_result(completion_handler_type& h) \ - : future_(h.get_future()) \ - { \ - } \ - \ - return_type get() \ - { \ - return std::move(future_); \ - } \ - \ - private: \ - return_type future_; \ - }; \ - /**/ - BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF) -#undef BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF - -#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) - // || defined(GENERATING_DOCUMENTATION) - -} // namespace asio -} // namespace boost - -#include - -#endif // defined(BOOST_ASIO_HAS_STD_FUTURE) - // || defined(GENERATING_DOCUMENTATION) - -#endif // BOOST_ASIO_PACKAGED_TASK_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/placeholders.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/placeholders.hpp deleted file mode 100644 index 0bc72769..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/placeholders.hpp +++ /dev/null @@ -1,153 +0,0 @@ -// -// placeholders.hpp -// ~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_PLACEHOLDERS_HPP -#define BOOST_ASIO_PLACEHOLDERS_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_HAS_BOOST_BIND) -# include -#endif // defined(BOOST_ASIO_HAS_BOOST_BIND) - -#include - -namespace boost { -namespace asio { -namespace placeholders { - -#if defined(GENERATING_DOCUMENTATION) - -/// An argument placeholder, for use with boost::bind(), that corresponds to -/// the error argument of a handler for any of the asynchronous functions. -unspecified error; - -/// An argument placeholder, for use with boost::bind(), that corresponds to -/// the bytes_transferred argument of a handler for asynchronous functions such -/// as boost::asio::basic_stream_socket::async_write_some or -/// boost::asio::async_write. -unspecified bytes_transferred; - -/// An argument placeholder, for use with boost::bind(), that corresponds to -/// the iterator argument of a handler for asynchronous functions such as -/// boost::asio::async_connect. -unspecified iterator; - -/// An argument placeholder, for use with boost::bind(), that corresponds to -/// the results argument of a handler for asynchronous functions such as -/// boost::asio::basic_resolver::async_resolve. -unspecified results; - -/// An argument placeholder, for use with boost::bind(), that corresponds to -/// the results argument of a handler for asynchronous functions such as -/// boost::asio::async_connect. -unspecified endpoint; - -/// An argument placeholder, for use with boost::bind(), that corresponds to -/// the signal_number argument of a handler for asynchronous functions such as -/// boost::asio::signal_set::async_wait. -unspecified signal_number; - -#elif defined(BOOST_ASIO_HAS_BOOST_BIND) -# if defined(__BORLANDC__) || defined(__GNUC__) - -inline boost::arg<1> error() -{ - return boost::arg<1>(); -} - -inline boost::arg<2> bytes_transferred() -{ - return boost::arg<2>(); -} - -inline boost::arg<2> iterator() -{ - return boost::arg<2>(); -} - -inline boost::arg<2> results() -{ - return boost::arg<2>(); -} - -inline boost::arg<2> endpoint() -{ - return boost::arg<2>(); -} - -inline boost::arg<2> signal_number() -{ - return boost::arg<2>(); -} - -# else - -namespace detail -{ - template - struct placeholder - { - static boost::arg& get() - { - static boost::arg result; - return result; - } - }; -} - -# if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC < 1400) - -static boost::arg<1>& error - = boost::asio::placeholders::detail::placeholder<1>::get(); -static boost::arg<2>& bytes_transferred - = boost::asio::placeholders::detail::placeholder<2>::get(); -static boost::arg<2>& iterator - = boost::asio::placeholders::detail::placeholder<2>::get(); -static boost::arg<2>& results - = boost::asio::placeholders::detail::placeholder<2>::get(); -static boost::arg<2>& endpoint - = boost::asio::placeholders::detail::placeholder<2>::get(); -static boost::arg<2>& signal_number - = boost::asio::placeholders::detail::placeholder<2>::get(); - -# else - -namespace -{ - boost::arg<1>& error - = boost::asio::placeholders::detail::placeholder<1>::get(); - boost::arg<2>& bytes_transferred - = boost::asio::placeholders::detail::placeholder<2>::get(); - boost::arg<2>& iterator - = boost::asio::placeholders::detail::placeholder<2>::get(); - boost::arg<2>& results - = boost::asio::placeholders::detail::placeholder<2>::get(); - boost::arg<2>& endpoint - = boost::asio::placeholders::detail::placeholder<2>::get(); - boost::arg<2>& signal_number - = boost::asio::placeholders::detail::placeholder<2>::get(); -} // namespace - -# endif -# endif -#endif - -} // namespace placeholders -} // namespace asio -} // namespace boost - -#include - -#endif // BOOST_ASIO_PLACEHOLDERS_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/post.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/post.hpp deleted file mode 100644 index 65e858fd..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/post.hpp +++ /dev/null @@ -1,109 +0,0 @@ -// -// post.hpp -// ~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_POST_HPP -#define BOOST_ASIO_POST_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Submits a completion token or function object for execution. -/** - * This function submits an object for execution using the object's associated - * executor. The function object is queued for execution, and is never called - * from the current thread prior to returning from post(). - * - * This function has the following effects: - * - * @li Constructs a function object handler of type @c Handler, initialized - * with handler(forward(token)). - * - * @li Constructs an object @c result of type async_result, - * initializing the object as result(handler). - * - * @li Obtains the handler's associated executor object @c ex by performing - * get_associated_executor(handler). - * - * @li Obtains the handler's associated allocator object @c alloc by performing - * get_associated_allocator(handler). - * - * @li Performs ex.post(std::move(handler), alloc). - * - * @li Returns result.get(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post( - BOOST_ASIO_MOVE_ARG(CompletionToken) token); - -/// Submits a completion token or function object for execution. -/** - * This function submits an object for execution using the specified executor. - * The function object is queued for execution, and is never called from the - * current thread prior to returning from post(). - * - * This function has the following effects: - * - * @li Constructs a function object handler of type @c Handler, initialized - * with handler(forward(token)). - * - * @li Constructs an object @c result of type async_result, - * initializing the object as result(handler). - * - * @li Obtains the handler's associated executor object @c ex1 by performing - * get_associated_executor(handler). - * - * @li Creates a work object @c w by performing make_work(ex1). - * - * @li Obtains the handler's associated allocator object @c alloc by performing - * get_associated_allocator(handler). - * - * @li Constructs a function object @c f with a function call operator that - * performs ex1.dispatch(std::move(handler), alloc) followed by - * w.reset(). - * - * @li Performs Executor(ex).post(std::move(f), alloc). - * - * @li Returns result.get(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post( - const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type* = 0); - -/// Submits a completion token or function object for execution. -/** - * @returns post(ctx.get_executor(), forward(token)). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post( - ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type* = 0); - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif // BOOST_ASIO_POST_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/raw_socket_service.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/raw_socket_service.hpp deleted file mode 100644 index 9a777013..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/raw_socket_service.hpp +++ /dev/null @@ -1,468 +0,0 @@ -// -// raw_socket_service.hpp -// ~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_RAW_SOCKET_SERVICE_HPP -#define BOOST_ASIO_RAW_SOCKET_SERVICE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#include -#include -#include -#include -#include - -#if defined(BOOST_ASIO_WINDOWS_RUNTIME) -# include -#elif defined(BOOST_ASIO_HAS_IOCP) -# include -#else -# include -#endif - -#include - -namespace boost { -namespace asio { - -/// Default service implementation for a raw socket. -template -class raw_socket_service -#if defined(GENERATING_DOCUMENTATION) - : public boost::asio::io_context::service -#else - : public boost::asio::detail::service_base > -#endif -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The unique service identifier. - static boost::asio::io_context::id id; -#endif - - /// The protocol type. - typedef Protocol protocol_type; - - /// The endpoint type. - typedef typename Protocol::endpoint endpoint_type; - -private: - // The type of the platform-specific implementation. -#if defined(BOOST_ASIO_WINDOWS_RUNTIME) - typedef detail::null_socket_service service_impl_type; -#elif defined(BOOST_ASIO_HAS_IOCP) - typedef detail::win_iocp_socket_service service_impl_type; -#else - typedef detail::reactive_socket_service service_impl_type; -#endif - -public: - /// The type of a raw socket. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined implementation_type; -#else - typedef typename service_impl_type::implementation_type implementation_type; -#endif - - /// The native socket type. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined native_handle_type; -#else - typedef typename service_impl_type::native_handle_type native_handle_type; -#endif - - /// Construct a new raw socket service for the specified io_context. - explicit raw_socket_service(boost::asio::io_context& io_context) - : boost::asio::detail::service_base< - raw_socket_service >(io_context), - service_impl_(io_context) - { - } - - /// Construct a new raw socket implementation. - void construct(implementation_type& impl) - { - service_impl_.construct(impl); - } - -#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move-construct a new raw socket implementation. - void move_construct(implementation_type& impl, - implementation_type& other_impl) - { - service_impl_.move_construct(impl, other_impl); - } - - /// Move-assign from another raw socket implementation. - void move_assign(implementation_type& impl, - raw_socket_service& other_service, - implementation_type& other_impl) - { - service_impl_.move_assign(impl, other_service.service_impl_, other_impl); - } - - // All socket services have access to each other's implementations. - template friend class raw_socket_service; - - /// Move-construct a new raw socket implementation from another protocol - /// type. - template - void converting_move_construct(implementation_type& impl, - raw_socket_service& other_service, - typename raw_socket_service< - Protocol1>::implementation_type& other_impl, - typename enable_if::value>::type* = 0) - { - service_impl_.template converting_move_construct( - impl, other_service.service_impl_, other_impl); - } -#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Destroy a raw socket implementation. - void destroy(implementation_type& impl) - { - service_impl_.destroy(impl); - } - - // Open a new raw socket implementation. - BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl, - const protocol_type& protocol, boost::system::error_code& ec) - { - if (protocol.type() == BOOST_ASIO_OS_DEF(SOCK_RAW)) - service_impl_.open(impl, protocol, ec); - else - ec = boost::asio::error::invalid_argument; - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Assign an existing native socket to a raw socket. - BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl, - const protocol_type& protocol, const native_handle_type& native_socket, - boost::system::error_code& ec) - { - service_impl_.assign(impl, protocol, native_socket, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the socket is open. - bool is_open(const implementation_type& impl) const - { - return service_impl_.is_open(impl); - } - - /// Close a raw socket implementation. - BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.close(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Release ownership of the underlying socket. - native_handle_type release(implementation_type& impl, - boost::system::error_code& ec) - { - return service_impl_.release(impl, ec); - } - - /// Get the native socket implementation. - native_handle_type native_handle(implementation_type& impl) - { - return service_impl_.native_handle(impl); - } - - /// Cancel all asynchronous operations associated with the socket. - BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.cancel(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the socket is at the out-of-band data mark. - bool at_mark(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.at_mark(impl, ec); - } - - /// Determine the number of bytes available for reading. - std::size_t available(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.available(impl, ec); - } - - // Bind the raw socket to the specified local endpoint. - BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl, - const endpoint_type& endpoint, boost::system::error_code& ec) - { - service_impl_.bind(impl, endpoint, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Connect the raw socket to the specified endpoint. - BOOST_ASIO_SYNC_OP_VOID connect(implementation_type& impl, - const endpoint_type& peer_endpoint, boost::system::error_code& ec) - { - service_impl_.connect(impl, peer_endpoint, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Start an asynchronous connect. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler, - void (boost::system::error_code)) - async_connect(implementation_type& impl, - const endpoint_type& peer_endpoint, - BOOST_ASIO_MOVE_ARG(ConnectHandler) handler) - { - async_completion init(handler); - - service_impl_.async_connect(impl, peer_endpoint, init.completion_handler); - - return init.result.get(); - } - - /// Set a socket option. - template - BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl, - const SettableSocketOption& option, boost::system::error_code& ec) - { - service_impl_.set_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get a socket option. - template - BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl, - GettableSocketOption& option, boost::system::error_code& ec) const - { - service_impl_.get_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Perform an IO control command on the socket. - template - BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl, - IoControlCommand& command, boost::system::error_code& ec) - { - service_impl_.io_control(impl, command, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Gets the non-blocking mode of the socket. - bool non_blocking(const implementation_type& impl) const - { - return service_impl_.non_blocking(impl); - } - - /// Sets the non-blocking mode of the socket. - BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl, - bool mode, boost::system::error_code& ec) - { - service_impl_.non_blocking(impl, mode, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Gets the non-blocking mode of the native socket implementation. - bool native_non_blocking(const implementation_type& impl) const - { - return service_impl_.native_non_blocking(impl); - } - - /// Sets the non-blocking mode of the native socket implementation. - BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl, - bool mode, boost::system::error_code& ec) - { - service_impl_.native_non_blocking(impl, mode, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get the local endpoint. - endpoint_type local_endpoint(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.local_endpoint(impl, ec); - } - - /// Get the remote endpoint. - endpoint_type remote_endpoint(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.remote_endpoint(impl, ec); - } - - /// Disable sends or receives on the socket. - BOOST_ASIO_SYNC_OP_VOID shutdown(implementation_type& impl, - socket_base::shutdown_type what, boost::system::error_code& ec) - { - service_impl_.shutdown(impl, what, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Wait for the socket to become ready to read, ready to write, or to have - /// pending error conditions. - BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl, - socket_base::wait_type w, boost::system::error_code& ec) - { - service_impl_.wait(impl, w, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Asynchronously wait for the socket to become ready to read, ready to - /// write, or to have pending error conditions. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler, - void (boost::system::error_code)) - async_wait(implementation_type& impl, socket_base::wait_type w, - BOOST_ASIO_MOVE_ARG(WaitHandler) handler) - { - async_completion init(handler); - - service_impl_.async_wait(impl, w, init.completion_handler); - - return init.result.get(); - } - - /// Send the given data to the peer. - template - std::size_t send(implementation_type& impl, - const ConstBufferSequence& buffers, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.send(impl, buffers, flags, ec); - } - - /// Start an asynchronous send. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_send(implementation_type& impl, const ConstBufferSequence& buffers, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - async_completion init(handler); - - service_impl_.async_send(impl, buffers, flags, init.completion_handler); - - return init.result.get(); - } - - /// Send raw data to the specified endpoint. - template - std::size_t send_to(implementation_type& impl, - const ConstBufferSequence& buffers, const endpoint_type& destination, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.send_to(impl, buffers, destination, flags, ec); - } - - /// Start an asynchronous send. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_send_to(implementation_type& impl, - const ConstBufferSequence& buffers, const endpoint_type& destination, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - async_completion init(handler); - - service_impl_.async_send_to(impl, buffers, - destination, flags, init.completion_handler); - - return init.result.get(); - } - - /// Receive some data from the peer. - template - std::size_t receive(implementation_type& impl, - const MutableBufferSequence& buffers, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.receive(impl, buffers, flags, ec); - } - - /// Start an asynchronous receive. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_receive(implementation_type& impl, - const MutableBufferSequence& buffers, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - async_completion init(handler); - - service_impl_.async_receive(impl, buffers, flags, init.completion_handler); - - return init.result.get(); - } - - /// Receive raw data with the endpoint of the sender. - template - std::size_t receive_from(implementation_type& impl, - const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.receive_from(impl, buffers, sender_endpoint, flags, - ec); - } - - /// Start an asynchronous receive that will get the endpoint of the sender. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_receive_from(implementation_type& impl, - const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - async_completion init(handler); - - service_impl_.async_receive_from(impl, buffers, - sender_endpoint, flags, init.completion_handler); - - return init.result.get(); - } - -private: - // Destroy all user-defined handler objects owned by the service. - void shutdown() - { - service_impl_.shutdown(); - } - - // The platform-specific implementation. - service_impl_type service_impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#endif // BOOST_ASIO_RAW_SOCKET_SERVICE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read.hpp deleted file mode 100644 index d03ed5a7..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read.hpp +++ /dev/null @@ -1,949 +0,0 @@ -// -// read.hpp -// ~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_READ_HPP -#define BOOST_ASIO_READ_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -# include -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -#include - -namespace boost { -namespace asio { - -/** - * @defgroup read boost::asio::read - * - * @brief Attempt to read a certain amount of data from a stream before - * returning. - */ -/*@{*/ - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * stream. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::read(s, boost::asio::buffer(data, size)); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read( - * s, buffers, - * boost::asio::transfer_all()); @endcode - */ -template -std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, - typename enable_if< - is_mutable_buffer_sequence::value - >::type* = 0); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * stream. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes transferred. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::read(s, boost::asio::buffer(data, size), ec); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read( - * s, buffers, - * boost::asio::transfer_all(), ec); @endcode - */ -template -std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, - boost::system::error_code& ec, - typename enable_if< - is_mutable_buffer_sequence::value - >::type* = 0); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * stream. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's read_some function. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::read(s, boost::asio::buffer(data, size), - * boost::asio::transfer_at_least(32)); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ -template -std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, - CompletionCondition completion_condition, - typename enable_if< - is_mutable_buffer_sequence::value - >::type* = 0); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * stream. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's read_some function. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes read. If an error occurs, returns the total - * number of bytes successfully transferred prior to the error. - */ -template -std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, - CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< - is_mutable_buffer_sequence::value - >::type* = 0); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The specified dynamic buffer sequence is full (that is, it has reached - * maximum size). - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read( - * s, buffers, - * boost::asio::transfer_all()); @endcode - */ -template -std::size_t read(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - typename enable_if< - is_dynamic_buffer::value - >::type* = 0); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffer is full (that is, it has reached maximum size). - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes transferred. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read( - * s, buffers, - * boost::asio::transfer_all(), ec); @endcode - */ -template -std::size_t read(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - boost::system::error_code& ec, - typename enable_if< - is_dynamic_buffer::value - >::type* = 0); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The specified dynamic buffer sequence is full (that is, it has reached - * maximum size). - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's read_some function. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - */ -template -std::size_t read(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - CompletionCondition completion_condition, - typename enable_if< - is_dynamic_buffer::value - >::type* = 0); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The specified dynamic buffer sequence is full (that is, it has reached - * maximum size). - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's read_some function. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes read. If an error occurs, returns the total - * number of bytes successfully transferred prior to the error. - */ -template -std::size_t read(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< - is_dynamic_buffer::value - >::type* = 0); - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -#if !defined(BOOST_ASIO_NO_IOSTREAM) - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffer is full (that is, it has reached maximum size). - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read( - * s, b, - * boost::asio::transfer_all()); @endcode - */ -template -std::size_t read(SyncReadStream& s, basic_streambuf& b); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffer is full (that is, it has reached maximum size). - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes transferred. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read( - * s, b, - * boost::asio::transfer_all(), ec); @endcode - */ -template -std::size_t read(SyncReadStream& s, basic_streambuf& b, - boost::system::error_code& ec); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffer is full (that is, it has reached maximum size). - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's read_some function. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - */ -template -std::size_t read(SyncReadStream& s, basic_streambuf& b, - CompletionCondition completion_condition); - -/// Attempt to read a certain amount of data from a stream before returning. -/** - * This function is used to read a certain number of bytes of data from a - * stream. The call will block until one of the following conditions is true: - * - * @li The supplied buffer is full (that is, it has reached maximum size). - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's read_some function. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes read. If an error occurs, returns the total - * number of bytes successfully transferred prior to the error. - */ -template -std::size_t read(SyncReadStream& s, basic_streambuf& b, - CompletionCondition completion_condition, boost::system::error_code& ec); - -#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -/*@}*/ -/** - * @defgroup async_read boost::asio::async_read - * - * @brief Start an asynchronous operation to read a certain amount of data from - * a stream. - */ -/*@{*/ - -/// Start an asynchronous operation to read a certain amount of data from a -/// stream. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a stream. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions is - * true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. The - * program must ensure that the stream performs no other read operations (such - * as async_read, the stream's async_read_some function, or any other composed - * operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * stream. Although the buffers object may be copied as necessary, ownership of - * the underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * - * std::size_t bytes_transferred // Number of bytes copied into the - * // buffers. If an error occurred, - * // this will be the number of - * // bytes successfully transferred - * // prior to the error. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code - * boost::asio::async_read(s, boost::asio::buffer(data, size), handler); - * @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - * - * @note This overload is equivalent to calling: - * @code boost::asio::async_read( - * s, buffers, - * boost::asio::transfer_all(), - * handler); @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< - is_mutable_buffer_sequence::value - >::type* = 0); - -/// Start an asynchronous operation to read a certain amount of data from a -/// stream. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a stream. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions is - * true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li The completion_condition function object returns 0. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * stream. Although the buffers object may be copied as necessary, ownership of - * the underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest async_read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's async_read_some function. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * - * std::size_t bytes_transferred // Number of bytes copied into the - * // buffers. If an error occurred, - * // this will be the number of - * // bytes successfully transferred - * // prior to the error. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::async_read(s, - * boost::asio::buffer(data, size), - * boost::asio::transfer_at_least(32), - * handler); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, - CompletionCondition completion_condition, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< - is_mutable_buffer_sequence::value - >::type* = 0); - -/// Start an asynchronous operation to read a certain amount of data from a -/// stream. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a stream. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions is - * true: - * - * @li The specified dynamic buffer sequence is full (that is, it has reached - * maximum size). - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. The - * program must ensure that the stream performs no other read operations (such - * as async_read, the stream's async_read_some function, or any other composed - * operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * - * std::size_t bytes_transferred // Number of bytes copied into the - * // buffers. If an error occurred, - * // this will be the number of - * // bytes successfully transferred - * // prior to the error. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note This overload is equivalent to calling: - * @code boost::asio::async_read( - * s, buffers, - * boost::asio::transfer_all(), - * handler); @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read(AsyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< - is_dynamic_buffer::value - >::type* = 0); - -/// Start an asynchronous operation to read a certain amount of data from a -/// stream. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a stream. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions is - * true: - * - * @li The specified dynamic buffer sequence is full (that is, it has reached - * maximum size). - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. The - * program must ensure that the stream performs no other read operations (such - * as async_read, the stream's async_read_some function, or any other composed - * operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest async_read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's async_read_some function. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * - * std::size_t bytes_transferred // Number of bytes copied into the - * // buffers. If an error occurred, - * // this will be the number of - * // bytes successfully transferred - * // prior to the error. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read(AsyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - CompletionCondition completion_condition, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< - is_dynamic_buffer::value - >::type* = 0); - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -#if !defined(BOOST_ASIO_NO_IOSTREAM) - -/// Start an asynchronous operation to read a certain amount of data from a -/// stream. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a stream. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions is - * true: - * - * @li The supplied buffer is full (that is, it has reached maximum size). - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. The - * program must ensure that the stream performs no other read operations (such - * as async_read, the stream's async_read_some function, or any other composed - * operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param b A basic_streambuf object into which the data will be read. Ownership - * of the streambuf is retained by the caller, which must guarantee that it - * remains valid until the handler is called. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * - * std::size_t bytes_transferred // Number of bytes copied into the - * // buffers. If an error occurred, - * // this will be the number of - * // bytes successfully transferred - * // prior to the error. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note This overload is equivalent to calling: - * @code boost::asio::async_read( - * s, b, - * boost::asio::transfer_all(), - * handler); @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read(AsyncReadStream& s, basic_streambuf& b, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -/// Start an asynchronous operation to read a certain amount of data from a -/// stream. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a stream. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions is - * true: - * - * @li The supplied buffer is full (that is, it has reached maximum size). - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. The - * program must ensure that the stream performs no other read operations (such - * as async_read, the stream's async_read_some function, or any other composed - * operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param b A basic_streambuf object into which the data will be read. Ownership - * of the streambuf is retained by the caller, which must guarantee that it - * remains valid until the handler is called. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest async_read_some operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the stream's async_read_some function. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * - * std::size_t bytes_transferred // Number of bytes copied into the - * // buffers. If an error occurred, - * // this will be the number of - * // bytes successfully transferred - * // prior to the error. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read(AsyncReadStream& s, basic_streambuf& b, - CompletionCondition completion_condition, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -/*@}*/ - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif // BOOST_ASIO_READ_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_at.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_at.hpp deleted file mode 100644 index fc10c811..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_at.hpp +++ /dev/null @@ -1,673 +0,0 @@ -// -// read_at.hpp -// ~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_READ_AT_HPP -#define BOOST_ASIO_READ_AT_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -# include -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -#include - -namespace boost { -namespace asio { - -/** - * @defgroup read_at boost::asio::read_at - * - * @brief Attempt to read a certain amount of data at the specified offset - * before returning. - */ -/*@{*/ - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * device. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::read_at(d, 42, boost::asio::buffer(data, size)); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read_at( - * d, 42, buffers, - * boost::asio::transfer_all()); @endcode - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, const MutableBufferSequence& buffers); - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * device. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes transferred. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::read_at(d, 42, - * boost::asio::buffer(data, size), ec); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read_at( - * d, 42, buffers, - * boost::asio::transfer_all(), ec); @endcode - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, const MutableBufferSequence& buffers, - boost::system::error_code& ec); - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * device. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some_at operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the device's read_some_at function. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::read_at(d, 42, boost::asio::buffer(data, size), - * boost::asio::transfer_at_least(32)); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, const MutableBufferSequence& buffers, - CompletionCondition completion_condition); - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * device. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some_at operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the device's read_some_at function. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes read. If an error occurs, returns the total - * number of bytes successfully transferred prior to the error. - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, const MutableBufferSequence& buffers, - CompletionCondition completion_condition, boost::system::error_code& ec); - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -#if !defined(BOOST_ASIO_NO_IOSTREAM) - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read_at( - * d, 42, b, - * boost::asio::transfer_all()); @endcode - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, basic_streambuf& b); - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes transferred. - * - * @note This overload is equivalent to calling: - * @code boost::asio::read_at( - * d, 42, b, - * boost::asio::transfer_all(), ec); @endcode - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, basic_streambuf& b, - boost::system::error_code& ec); - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some_at operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the device's read_some_at function. - * - * @returns The number of bytes transferred. - * - * @throws boost::system::system_error Thrown on failure. - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, basic_streambuf& b, - CompletionCondition completion_condition); - -/// Attempt to read a certain amount of data at the specified offset before -/// returning. -/** - * This function is used to read a certain number of bytes of data from a - * random access device at the specified offset. The call will block until one - * of the following conditions is true: - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the device's - * read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the SyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param b The basic_streambuf object into which the data will be read. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest read_some_at operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the device's read_some_at function. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes read. If an error occurs, returns the total - * number of bytes successfully transferred prior to the error. - */ -template -std::size_t read_at(SyncRandomAccessReadDevice& d, - uint64_t offset, basic_streambuf& b, - CompletionCondition completion_condition, boost::system::error_code& ec); - -#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -/*@}*/ -/** - * @defgroup async_read_at boost::asio::async_read_at - * - * @brief Start an asynchronous operation to read a certain amount of data at - * the specified offset. - */ -/*@{*/ - -/// Start an asynchronous operation to read a certain amount of data at the -/// specified offset. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a random access device at the specified offset. The function call - * always returns immediately. The asynchronous operation will continue until - * one of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the device's - * async_read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the AsyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * device. Although the buffers object may be copied as necessary, ownership of - * the underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // Number of bytes copied into the buffers. If an error - * // occurred, this will be the number of bytes successfully - * // transferred prior to the error. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code - * boost::asio::async_read_at(d, 42, boost::asio::buffer(data, size), handler); - * @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - * - * @note This overload is equivalent to calling: - * @code boost::asio::async_read_at( - * d, 42, buffers, - * boost::asio::transfer_all(), - * handler); @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, - const MutableBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -/// Start an asynchronous operation to read a certain amount of data at the -/// specified offset. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a random access device at the specified offset. The function call - * always returns immediately. The asynchronous operation will continue until - * one of the following conditions is true: - * - * @li The supplied buffers are full. That is, the bytes transferred is equal to - * the sum of the buffer sizes. - * - * @li The completion_condition function object returns 0. - * - * @param d The device from which the data is to be read. The type must support - * the AsyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param buffers One or more buffers into which the data will be read. The sum - * of the buffer sizes indicates the maximum number of bytes to read from the - * device. Although the buffers object may be copied as necessary, ownership of - * the underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest async_read_some_at operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the device's async_read_some_at function. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // Number of bytes copied into the buffers. If an error - * // occurred, this will be the number of bytes successfully - * // transferred prior to the error. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code boost::asio::async_read_at(d, 42, - * boost::asio::buffer(data, size), - * boost::asio::transfer_at_least(32), - * handler); @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_at(AsyncRandomAccessReadDevice& d, - uint64_t offset, const MutableBufferSequence& buffers, - CompletionCondition completion_condition, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -#if !defined(BOOST_ASIO_NO_IOSTREAM) - -/// Start an asynchronous operation to read a certain amount of data at the -/// specified offset. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a random access device at the specified offset. The function call - * always returns immediately. The asynchronous operation will continue until - * one of the following conditions is true: - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the device's - * async_read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the AsyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param b A basic_streambuf object into which the data will be read. Ownership - * of the streambuf is retained by the caller, which must guarantee that it - * remains valid until the handler is called. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // Number of bytes copied into the buffers. If an error - * // occurred, this will be the number of bytes successfully - * // transferred prior to the error. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note This overload is equivalent to calling: - * @code boost::asio::async_read_at( - * d, 42, b, - * boost::asio::transfer_all(), - * handler); @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset, - basic_streambuf& b, BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -/// Start an asynchronous operation to read a certain amount of data at the -/// specified offset. -/** - * This function is used to asynchronously read a certain number of bytes of - * data from a random access device at the specified offset. The function call - * always returns immediately. The asynchronous operation will continue until - * one of the following conditions is true: - * - * @li The completion_condition function object returns 0. - * - * This operation is implemented in terms of zero or more calls to the device's - * async_read_some_at function. - * - * @param d The device from which the data is to be read. The type must support - * the AsyncRandomAccessReadDevice concept. - * - * @param offset The offset at which the data will be read. - * - * @param b A basic_streambuf object into which the data will be read. Ownership - * of the streambuf is retained by the caller, which must guarantee that it - * remains valid until the handler is called. - * - * @param completion_condition The function object to be called to determine - * whether the read operation is complete. The signature of the function object - * must be: - * @code std::size_t completion_condition( - * // Result of latest async_read_some_at operation. - * const boost::system::error_code& error, - * - * // Number of bytes transferred so far. - * std::size_t bytes_transferred - * ); @endcode - * A return value of 0 indicates that the read operation is complete. A non-zero - * return value indicates the maximum number of bytes to be read on the next - * call to the device's async_read_some_at function. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // Number of bytes copied into the buffers. If an error - * // occurred, this will be the number of bytes successfully - * // transferred prior to the error. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_at(AsyncRandomAccessReadDevice& d, - uint64_t offset, basic_streambuf& b, - CompletionCondition completion_condition, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -/*@}*/ - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif // BOOST_ASIO_READ_AT_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_until.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_until.hpp deleted file mode 100644 index 12f82c78..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/read_until.hpp +++ /dev/null @@ -1,1826 +0,0 @@ -// -// read_until.hpp -// ~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_READ_UNTIL_HPP -#define BOOST_ASIO_READ_UNTIL_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -# include -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -#include - -namespace boost { -namespace asio { - -namespace detail -{ - char (&has_result_type_helper(...))[2]; - - template - char has_result_type_helper(T*, typename T::result_type* = 0); - - template - struct has_result_type - { - enum { value = (sizeof((has_result_type_helper)((T*)(0))) == 1) }; - }; -} // namespace detail - -/// Type trait used to determine whether a type can be used as a match condition -/// function with read_until and async_read_until. -template -struct is_match_condition -{ -#if defined(GENERATING_DOCUMENTATION) - /// The value member is true if the type may be used as a match condition. - static const bool value; -#else - enum - { - value = boost::asio::is_function< - typename boost::asio::remove_pointer::type>::value - || detail::has_result_type::value - }; -#endif -}; - -/** - * @defgroup read_until boost::asio::read_until - * - * @brief Read data into a dynamic buffer sequence, or into a streambuf, until - * it contains a delimiter, matches a regular expression, or a function object - * indicates a match. - */ -/*@{*/ - -/// Read data into a dynamic buffer sequence until it contains a specified -/// delimiter. -/** - * This function is used to read data into the specified dynamic buffer - * sequence until the dynamic buffer sequence's get area contains the specified - * delimiter. The call will block until one of the following conditions is - * true: - * - * @li The get area of the dynamic buffer sequence contains the specified - * delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the dynamic buffer sequence's get area already - * contains the delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @param delim The delimiter character. - * - * @returns The number of bytes in the dynamic buffer sequence's get area up to - * and including the delimiter. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond the delimiter. An application will - * typically leave that data in the dynamic buffer sequence for a subsequent - * read_until operation to examine. - * - * @par Example - * To read data into a @c std::string until a newline is encountered: - * @code std::string data; - * std::string n = boost::asio::read_until(s, - * boost::asio::dynamic_buffer(data), '\n'); - * std::string line = data.substr(0, n); - * data.erase(0, n); @endcode - * After the @c read_until operation completes successfully, the string @c data - * contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode - * The call to @c substr then extracts the data up to and including the - * delimiter, so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\n' } @endcode - * After the call to @c erase, the remaining data is left in the buffer @c b as - * follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c read_until operation. - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim); - -/// Read data into a dynamic buffer sequence until it contains a specified -/// delimiter. -/** - * This function is used to read data into the specified dynamic buffer - * sequence until the dynamic buffer sequence's get area contains the specified - * delimiter. The call will block until one of the following conditions is - * true: - * - * @li The get area of the dynamic buffer sequence contains the specified - * delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the dynamic buffer sequence's get area already - * contains the delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @param delim The delimiter character. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the dynamic buffer sequence's get area up to - * and including the delimiter. Returns 0 if an error occurred. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond the delimiter. An application will - * typically leave that data in the dynamic buffer sequence for a subsequent - * read_until operation to examine. - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - char delim, boost::system::error_code& ec); - -/// Read data into a dynamic buffer sequence until it contains a specified -/// delimiter. -/** - * This function is used to read data into the specified dynamic buffer - * sequence until the dynamic buffer sequence's get area contains the specified - * delimiter. The call will block until one of the following conditions is - * true: - * - * @li The get area of the dynamic buffer sequence contains the specified - * delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the dynamic buffer sequence's get area already - * contains the delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @param delim The delimiter string. - * - * @returns The number of bytes in the dynamic buffer sequence's get area up to - * and including the delimiter. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond the delimiter. An application will - * typically leave that data in the dynamic buffer sequence for a subsequent - * read_until operation to examine. - * - * @par Example - * To read data into a @c std::string until a CR-LF sequence is encountered: - * @code std::string data; - * std::string n = boost::asio::read_until(s, - * boost::asio::dynamic_buffer(data), "\r\n"); - * std::string line = data.substr(0, n); - * data.erase(0, n); @endcode - * After the @c read_until operation completes successfully, the string @c data - * contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c substr then extracts the data up to and including the - * delimiter, so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode - * After the call to @c erase, the remaining data is left in the buffer @c b as - * follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c read_until operation. - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - BOOST_ASIO_STRING_VIEW_PARAM delim); - -/// Read data into a dynamic buffer sequence until it contains a specified -/// delimiter. -/** - * This function is used to read data into the specified dynamic buffer - * sequence until the dynamic buffer sequence's get area contains the specified - * delimiter. The call will block until one of the following conditions is - * true: - * - * @li The get area of the dynamic buffer sequence contains the specified - * delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the dynamic buffer sequence's get area already - * contains the delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * - * @param delim The delimiter string. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the dynamic buffer sequence's get area up to - * and including the delimiter. Returns 0 if an error occurred. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond the delimiter. An application will - * typically leave that data in the dynamic buffer sequence for a subsequent - * read_until operation to examine. - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - BOOST_ASIO_STRING_VIEW_PARAM delim, - boost::system::error_code& ec); - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ - || defined(GENERATING_DOCUMENTATION) - -/// Read data into a dynamic buffer sequence until some part of the data it -/// contains matches a regular expression. -/** - * This function is used to read data into the specified dynamic buffer - * sequence until the dynamic buffer sequence's get area contains some data - * that matches a regular expression. The call will block until one of the - * following conditions is true: - * - * @li A substring of the dynamic buffer sequence's get area matches the - * regular expression. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the dynamic buffer sequence's get area already - * contains data that matches the regular expression, the function returns - * immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers A dynamic buffer sequence into which the data will be read. - * - * @param expr The regular expression. - * - * @returns The number of bytes in the dynamic buffer sequence's get area up to - * and including the substring that matches the regular expression. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond that which matched the regular - * expression. An application will typically leave that data in the dynamic - * buffer sequence for a subsequent read_until operation to examine. - * - * @par Example - * To read data into a @c std::string until a CR-LF sequence is encountered: - * @code std::string data; - * std::string n = boost::asio::read_until(s, - * boost::asio::dynamic_buffer(data), boost::regex("\r\n")); - * std::string line = data.substr(0, n); - * data.erase(0, n); @endcode - * After the @c read_until operation completes successfully, the string @c data - * contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c substr then extracts the data up to and including the - * delimiter, so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode - * After the call to @c erase, the remaining data is left in the buffer @c b as - * follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c read_until operation. - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - const boost::regex& expr); - -/// Read data into a dynamic buffer sequence until some part of the data it -/// contains matches a regular expression. -/** - * This function is used to read data into the specified dynamic buffer - * sequence until the dynamic buffer sequence's get area contains some data - * that matches a regular expression. The call will block until one of the - * following conditions is true: - * - * @li A substring of the dynamic buffer sequence's get area matches the - * regular expression. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the dynamic buffer sequence's get area already - * contains data that matches the regular expression, the function returns - * immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers A dynamic buffer sequence into which the data will be read. - * - * @param expr The regular expression. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the dynamic buffer sequence's get area up to - * and including the substring that matches the regular expression. Returns 0 - * if an error occurred. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond that which matched the regular - * expression. An application will typically leave that data in the dynamic - * buffer sequence for a subsequent read_until operation to examine. - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - const boost::regex& expr, boost::system::error_code& ec); - -#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) - // || defined(GENERATING_DOCUMENTATION) - -/// Read data into a dynamic buffer sequence until a function object indicates a -/// match. - -/** - * This function is used to read data into the specified dynamic buffer - * sequence until a user-defined match condition function object, when applied - * to the data contained in the dynamic buffer sequence, indicates a successful - * match. The call will block until one of the following conditions is true: - * - * @li The match condition function object returns a std::pair where the second - * element evaluates to true. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the match condition function object already indicates - * a match, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers A dynamic buffer sequence into which the data will be read. - * - * @param match_condition The function object to be called to determine whether - * a match exists. The signature of the function object must be: - * @code pair match_condition(iterator begin, iterator end); - * @endcode - * where @c iterator represents the type: - * @code buffers_iterator - * @endcode - * The iterator parameters @c begin and @c end define the range of bytes to be - * scanned to determine whether there is a match. The @c first member of the - * return value is an iterator marking one-past-the-end of the bytes that have - * been consumed by the match function. This iterator is used to calculate the - * @c begin parameter for any subsequent invocation of the match condition. The - * @c second member of the return value is true if a match has been found, false - * otherwise. - * - * @returns The number of bytes in the dynamic_buffer's get area that - * have been fully consumed by the match function. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond that which matched the function object. - * An application will typically leave that data in the dynamic buffer sequence - * for a subsequent read_until operation to examine. - - * @note The default implementation of the @c is_match_condition type trait - * evaluates to true for function pointers and function objects with a - * @c result_type typedef. It must be specialised for other user-defined - * function objects. - * - * @par Examples - * To read data into a dynamic buffer sequence until whitespace is encountered: - * @code typedef boost::asio::buffers_iterator< - * boost::asio::const_buffers_1> iterator; - * - * std::pair - * match_whitespace(iterator begin, iterator end) - * { - * iterator i = begin; - * while (i != end) - * if (std::isspace(*i++)) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * ... - * std::string data; - * boost::asio::read_until(s, data, match_whitespace); - * @endcode - * - * To read data into a @c std::string until a matching character is found: - * @code class match_char - * { - * public: - * explicit match_char(char c) : c_(c) {} - * - * template - * std::pair operator()( - * Iterator begin, Iterator end) const - * { - * Iterator i = begin; - * while (i != end) - * if (c_ == *i++) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * - * private: - * char c_; - * }; - * - * namespace asio { - * template <> struct is_match_condition - * : public boost::true_type {}; - * } // namespace asio - * ... - * std::string data; - * boost::asio::read_until(s, data, match_char('a')); - * @endcode - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - MatchCondition match_condition, - typename enable_if::value>::type* = 0); - -/// Read data into a dynamic buffer sequence until a function object indicates a -/// match. -/** - * This function is used to read data into the specified dynamic buffer - * sequence until a user-defined match condition function object, when applied - * to the data contained in the dynamic buffer sequence, indicates a successful - * match. The call will block until one of the following conditions is true: - * - * @li The match condition function object returns a std::pair where the second - * element evaluates to true. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the match condition function object already indicates - * a match, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param buffers A dynamic buffer sequence into which the data will be read. - * - * @param match_condition The function object to be called to determine whether - * a match exists. The signature of the function object must be: - * @code pair match_condition(iterator begin, iterator end); - * @endcode - * where @c iterator represents the type: - * @code buffers_iterator - * @endcode - * The iterator parameters @c begin and @c end define the range of bytes to be - * scanned to determine whether there is a match. The @c first member of the - * return value is an iterator marking one-past-the-end of the bytes that have - * been consumed by the match function. This iterator is used to calculate the - * @c begin parameter for any subsequent invocation of the match condition. The - * @c second member of the return value is true if a match has been found, false - * otherwise. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the dynamic buffer sequence's get area that - * have been fully consumed by the match function. Returns 0 if an error - * occurred. - * - * @note After a successful read_until operation, the dynamic buffer sequence - * may contain additional data beyond that which matched the function object. - * An application will typically leave that data in the dynamic buffer sequence - * for a subsequent read_until operation to examine. - * - * @note The default implementation of the @c is_match_condition type trait - * evaluates to true for function pointers and function objects with a - * @c result_type typedef. It must be specialised for other user-defined - * function objects. - */ -template -std::size_t read_until(SyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - MatchCondition match_condition, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); - -#if !defined(BOOST_ASIO_NO_IOSTREAM) - -/// Read data into a streambuf until it contains a specified delimiter. -/** - * This function is used to read data into the specified streambuf until the - * streambuf's get area contains the specified delimiter. The call will block - * until one of the following conditions is true: - * - * @li The get area of the streambuf contains the specified delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the streambuf's get area already contains the - * delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param delim The delimiter character. - * - * @returns The number of bytes in the streambuf's get area up to and including - * the delimiter. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond the delimiter. An application will typically leave - * that data in the streambuf for a subsequent read_until operation to examine. - * - * @par Example - * To read data into a streambuf until a newline is encountered: - * @code boost::asio::streambuf b; - * boost::asio::read_until(s, b, '\n'); - * std::istream is(&b); - * std::string line; - * std::getline(is, line); @endcode - * After the @c read_until operation completes successfully, the buffer @c b - * contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode - * The call to @c std::getline then extracts the data up to and including the - * newline (which is discarded), so that the string @c line contains: - * @code { 'a', 'b', ..., 'c' } @endcode - * The remaining data is left in the buffer @c b as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c read_until operation. - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, char delim); - -/// Read data into a streambuf until it contains a specified delimiter. -/** - * This function is used to read data into the specified streambuf until the - * streambuf's get area contains the specified delimiter. The call will block - * until one of the following conditions is true: - * - * @li The get area of the streambuf contains the specified delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the streambuf's get area already contains the - * delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param delim The delimiter character. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the streambuf's get area up to and including - * the delimiter. Returns 0 if an error occurred. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond the delimiter. An application will typically leave - * that data in the streambuf for a subsequent read_until operation to examine. - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, char delim, - boost::system::error_code& ec); - -/// Read data into a streambuf until it contains a specified delimiter. -/** - * This function is used to read data into the specified streambuf until the - * streambuf's get area contains the specified delimiter. The call will block - * until one of the following conditions is true: - * - * @li The get area of the streambuf contains the specified delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the streambuf's get area already contains the - * delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param delim The delimiter string. - * - * @returns The number of bytes in the streambuf's get area up to and including - * the delimiter. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond the delimiter. An application will typically leave - * that data in the streambuf for a subsequent read_until operation to examine. - * - * @par Example - * To read data into a streambuf until a newline is encountered: - * @code boost::asio::streambuf b; - * boost::asio::read_until(s, b, "\r\n"); - * std::istream is(&b); - * std::string line; - * std::getline(is, line); @endcode - * After the @c read_until operation completes successfully, the buffer @c b - * contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c std::getline then extracts the data up to and including the - * newline (which is discarded), so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r' } @endcode - * The remaining data is left in the buffer @c b as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c read_until operation. - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, - BOOST_ASIO_STRING_VIEW_PARAM delim); - -/// Read data into a streambuf until it contains a specified delimiter. -/** - * This function is used to read data into the specified streambuf until the - * streambuf's get area contains the specified delimiter. The call will block - * until one of the following conditions is true: - * - * @li The get area of the streambuf contains the specified delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the streambuf's get area already contains the - * delimiter, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param delim The delimiter string. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the streambuf's get area up to and including - * the delimiter. Returns 0 if an error occurred. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond the delimiter. An application will typically leave - * that data in the streambuf for a subsequent read_until operation to examine. - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, - BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec); - -#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ - || defined(GENERATING_DOCUMENTATION) - -/// Read data into a streambuf until some part of the data it contains matches -/// a regular expression. -/** - * This function is used to read data into the specified streambuf until the - * streambuf's get area contains some data that matches a regular expression. - * The call will block until one of the following conditions is true: - * - * @li A substring of the streambuf's get area matches the regular expression. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the streambuf's get area already contains data that - * matches the regular expression, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param expr The regular expression. - * - * @returns The number of bytes in the streambuf's get area up to and including - * the substring that matches the regular expression. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond that which matched the regular expression. An - * application will typically leave that data in the streambuf for a subsequent - * read_until operation to examine. - * - * @par Example - * To read data into a streambuf until a CR-LF sequence is encountered: - * @code boost::asio::streambuf b; - * boost::asio::read_until(s, b, boost::regex("\r\n")); - * std::istream is(&b); - * std::string line; - * std::getline(is, line); @endcode - * After the @c read_until operation completes successfully, the buffer @c b - * contains the data which matched the regular expression: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c std::getline then extracts the data up to and including the - * newline (which is discarded), so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r' } @endcode - * The remaining data is left in the buffer @c b as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c read_until operation. - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, const boost::regex& expr); - -/// Read data into a streambuf until some part of the data it contains matches -/// a regular expression. -/** - * This function is used to read data into the specified streambuf until the - * streambuf's get area contains some data that matches a regular expression. - * The call will block until one of the following conditions is true: - * - * @li A substring of the streambuf's get area matches the regular expression. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the streambuf's get area already contains data that - * matches the regular expression, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param expr The regular expression. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the streambuf's get area up to and including - * the substring that matches the regular expression. Returns 0 if an error - * occurred. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond that which matched the regular expression. An - * application will typically leave that data in the streambuf for a subsequent - * read_until operation to examine. - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, const boost::regex& expr, - boost::system::error_code& ec); - -#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) - // || defined(GENERATING_DOCUMENTATION) - -/// Read data into a streambuf until a function object indicates a match. -/** - * This function is used to read data into the specified streambuf until a - * user-defined match condition function object, when applied to the data - * contained in the streambuf, indicates a successful match. The call will - * block until one of the following conditions is true: - * - * @li The match condition function object returns a std::pair where the second - * element evaluates to true. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the match condition function object already indicates - * a match, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param match_condition The function object to be called to determine whether - * a match exists. The signature of the function object must be: - * @code pair match_condition(iterator begin, iterator end); - * @endcode - * where @c iterator represents the type: - * @code buffers_iterator::const_buffers_type> - * @endcode - * The iterator parameters @c begin and @c end define the range of bytes to be - * scanned to determine whether there is a match. The @c first member of the - * return value is an iterator marking one-past-the-end of the bytes that have - * been consumed by the match function. This iterator is used to calculate the - * @c begin parameter for any subsequent invocation of the match condition. The - * @c second member of the return value is true if a match has been found, false - * otherwise. - * - * @returns The number of bytes in the streambuf's get area that have been fully - * consumed by the match function. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond that which matched the function object. An application - * will typically leave that data in the streambuf for a subsequent read_until - * operation to examine. - * - * @note The default implementation of the @c is_match_condition type trait - * evaluates to true for function pointers and function objects with a - * @c result_type typedef. It must be specialised for other user-defined - * function objects. - * - * @par Examples - * To read data into a streambuf until whitespace is encountered: - * @code typedef boost::asio::buffers_iterator< - * boost::asio::streambuf::const_buffers_type> iterator; - * - * std::pair - * match_whitespace(iterator begin, iterator end) - * { - * iterator i = begin; - * while (i != end) - * if (std::isspace(*i++)) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * ... - * boost::asio::streambuf b; - * boost::asio::read_until(s, b, match_whitespace); - * @endcode - * - * To read data into a streambuf until a matching character is found: - * @code class match_char - * { - * public: - * explicit match_char(char c) : c_(c) {} - * - * template - * std::pair operator()( - * Iterator begin, Iterator end) const - * { - * Iterator i = begin; - * while (i != end) - * if (c_ == *i++) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * - * private: - * char c_; - * }; - * - * namespace asio { - * template <> struct is_match_condition - * : public boost::true_type {}; - * } // namespace asio - * ... - * boost::asio::streambuf b; - * boost::asio::read_until(s, b, match_char('a')); - * @endcode - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, MatchCondition match_condition, - typename enable_if::value>::type* = 0); - -/// Read data into a streambuf until a function object indicates a match. -/** - * This function is used to read data into the specified streambuf until a - * user-defined match condition function object, when applied to the data - * contained in the streambuf, indicates a successful match. The call will - * block until one of the following conditions is true: - * - * @li The match condition function object returns a std::pair where the second - * element evaluates to true. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * read_some function. If the match condition function object already indicates - * a match, the function returns immediately. - * - * @param s The stream from which the data is to be read. The type must support - * the SyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param match_condition The function object to be called to determine whether - * a match exists. The signature of the function object must be: - * @code pair match_condition(iterator begin, iterator end); - * @endcode - * where @c iterator represents the type: - * @code buffers_iterator::const_buffers_type> - * @endcode - * The iterator parameters @c begin and @c end define the range of bytes to be - * scanned to determine whether there is a match. The @c first member of the - * return value is an iterator marking one-past-the-end of the bytes that have - * been consumed by the match function. This iterator is used to calculate the - * @c begin parameter for any subsequent invocation of the match condition. The - * @c second member of the return value is true if a match has been found, false - * otherwise. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes in the streambuf's get area that have been fully - * consumed by the match function. Returns 0 if an error occurred. - * - * @note After a successful read_until operation, the streambuf may contain - * additional data beyond that which matched the function object. An application - * will typically leave that data in the streambuf for a subsequent read_until - * operation to examine. - * - * @note The default implementation of the @c is_match_condition type trait - * evaluates to true for function pointers and function objects with a - * @c result_type typedef. It must be specialised for other user-defined - * function objects. - */ -template -std::size_t read_until(SyncReadStream& s, - boost::asio::basic_streambuf& b, - MatchCondition match_condition, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); - -#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -/*@}*/ -/** - * @defgroup async_read_until boost::asio::async_read_until - * - * @brief Start an asynchronous operation to read data into a dynamic buffer - * sequence, or into a streambuf, until it contains a delimiter, matches a - * regular expression, or a function object indicates a match. - */ -/*@{*/ - -/// Start an asynchronous operation to read data into a dynamic buffer sequence -/// until it contains a specified delimiter. -/** - * This function is used to asynchronously read data into the specified dynamic - * buffer sequence until the dynamic buffer sequence's get area contains the - * specified delimiter. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions - * is true: - * - * @li The get area of the dynamic buffer sequence contains the specified - * delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the dynamic buffer sequence's get area already contains the delimiter, this - * asynchronous operation completes immediately. The program must ensure that - * the stream performs no other read operations (such as async_read, - * async_read_until, the stream's async_read_some function, or any other - * composed operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param delim The delimiter character. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the dynamic buffer sequence's - * // get area up to and including the delimiter. - * // 0 if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the dynamic buffer - * sequence may contain additional data beyond the delimiter. An application - * will typically leave that data in the dynamic buffer sequence for a - * subsequent async_read_until operation to examine. - * - * @par Example - * To asynchronously read data into a @c std::string until a newline is - * encountered: - * @code std::string data; - * ... - * void handler(const boost::system::error_code& e, std::size_t size) - * { - * if (!e) - * { - * std::string line = data.substr(0, n); - * data.erase(0, n); - * ... - * } - * } - * ... - * boost::asio::async_read_until(s, data, '\n', handler); @endcode - * After the @c async_read_until operation completes successfully, the buffer - * @c data contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode - * The call to @c substr then extracts the data up to and including the - * delimiter, so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\n' } @endcode - * After the call to @c erase, the remaining data is left in the buffer @c data - * as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c async_read_until operation. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -/// Start an asynchronous operation to read data into a dynamic buffer sequence -/// until it contains a specified delimiter. -/** - * This function is used to asynchronously read data into the specified dynamic - * buffer sequence until the dynamic buffer sequence's get area contains the - * specified delimiter. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions - * is true: - * - * @li The get area of the dynamic buffer sequence contains the specified - * delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the dynamic buffer sequence's get area already contains the delimiter, this - * asynchronous operation completes immediately. The program must ensure that - * the stream performs no other read operations (such as async_read, - * async_read_until, the stream's async_read_some function, or any other - * composed operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param delim The delimiter string. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the dynamic buffer sequence's - * // get area up to and including the delimiter. - * // 0 if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the dynamic buffer - * sequence may contain additional data beyond the delimiter. An application - * will typically leave that data in the dynamic buffer sequence for a - * subsequent async_read_until operation to examine. - * - * @par Example - * To asynchronously read data into a @c std::string until a CR-LF sequence is - * encountered: - * @code std::string data; - * ... - * void handler(const boost::system::error_code& e, std::size_t size) - * { - * if (!e) - * { - * std::string line = data.substr(0, n); - * data.erase(0, n); - * ... - * } - * } - * ... - * boost::asio::async_read_until(s, data, "\r\n", handler); @endcode - * After the @c async_read_until operation completes successfully, the string - * @c data contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c substr then extracts the data up to and including the - * delimiter, so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode - * After the call to @c erase, the remaining data is left in the string @c data - * as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c async_read_until operation. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - BOOST_ASIO_STRING_VIEW_PARAM delim, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -#if !defined(BOOST_ASIO_NO_EXTENSIONS) -#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ - || defined(GENERATING_DOCUMENTATION) - -/// Start an asynchronous operation to read data into a dynamic buffer sequence -/// until some part of its data matches a regular expression. -/** - * This function is used to asynchronously read data into the specified dynamic - * buffer sequence until the dynamic buffer sequence's get area contains some - * data that matches a regular expression. The function call always returns - * immediately. The asynchronous operation will continue until one of the - * following conditions is true: - * - * @li A substring of the dynamic buffer sequence's get area matches the regular - * expression. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the dynamic buffer sequence's get area already contains data that matches - * the regular expression, this asynchronous operation completes immediately. - * The program must ensure that the stream performs no other read operations - * (such as async_read, async_read_until, the stream's async_read_some - * function, or any other composed operations that perform reads) until this - * operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param expr The regular expression. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the dynamic buffer - * // sequence's get area up to and including the - * // substring that matches the regular expression. - * // 0 if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the dynamic buffer - * sequence may contain additional data beyond that which matched the regular - * expression. An application will typically leave that data in the dynamic - * buffer sequence for a subsequent async_read_until operation to examine. - * - * @par Example - * To asynchronously read data into a @c std::string until a CR-LF sequence is - * encountered: - * @code std::string data; - * ... - * void handler(const boost::system::error_code& e, std::size_t size) - * { - * if (!e) - * { - * std::string line = data.substr(0, n); - * data.erase(0, n); - * ... - * } - * } - * ... - * boost::asio::async_read_until(s, data, - * boost::regex("\r\n"), handler); @endcode - * After the @c async_read_until operation completes successfully, the string - * @c data contains the data which matched the regular expression: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c substr then extracts the data up to and including the match, - * so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode - * After the call to @c erase, the remaining data is left in the string @c data - * as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c async_read_until operation. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - const boost::regex& expr, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) - // || defined(GENERATING_DOCUMENTATION) - -/// Start an asynchronous operation to read data into a dynamic buffer sequence -/// until a function object indicates a match. -/** - * This function is used to asynchronously read data into the specified dynamic - * buffer sequence until a user-defined match condition function object, when - * applied to the data contained in the dynamic buffer sequence, indicates a - * successful match. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions - * is true: - * - * @li The match condition function object returns a std::pair where the second - * element evaluates to true. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the match condition function object already indicates a match, this - * asynchronous operation completes immediately. The program must ensure that - * the stream performs no other read operations (such as async_read, - * async_read_until, the stream's async_read_some function, or any other - * composed operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param buffers The dynamic buffer sequence into which the data will be read. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param match_condition The function object to be called to determine whether - * a match exists. The signature of the function object must be: - * @code pair match_condition(iterator begin, iterator end); - * @endcode - * where @c iterator represents the type: - * @code buffers_iterator - * @endcode - * The iterator parameters @c begin and @c end define the range of bytes to be - * scanned to determine whether there is a match. The @c first member of the - * return value is an iterator marking one-past-the-end of the bytes that have - * been consumed by the match function. This iterator is used to calculate the - * @c begin parameter for any subsequent invocation of the match condition. The - * @c second member of the return value is true if a match has been found, false - * otherwise. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the dynamic buffer sequence's - * // get area that have been fully consumed by the match - * // function. O if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the dynamic buffer - * sequence may contain additional data beyond that which matched the function - * object. An application will typically leave that data in the dynamic buffer - * sequence for a subsequent async_read_until operation to examine. - * - * @note The default implementation of the @c is_match_condition type trait - * evaluates to true for function pointers and function objects with a - * @c result_type typedef. It must be specialised for other user-defined - * function objects. - * - * @par Examples - * To asynchronously read data into a @c std::string until whitespace is - * encountered: - * @code typedef boost::asio::buffers_iterator< - * boost::asio::const_buffers_1> iterator; - * - * std::pair - * match_whitespace(iterator begin, iterator end) - * { - * iterator i = begin; - * while (i != end) - * if (std::isspace(*i++)) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * ... - * void handler(const boost::system::error_code& e, std::size_t size); - * ... - * std::string data; - * boost::asio::async_read_until(s, data, match_whitespace, handler); - * @endcode - * - * To asynchronously read data into a @c std::string until a matching character - * is found: - * @code class match_char - * { - * public: - * explicit match_char(char c) : c_(c) {} - * - * template - * std::pair operator()( - * Iterator begin, Iterator end) const - * { - * Iterator i = begin; - * while (i != end) - * if (c_ == *i++) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * - * private: - * char c_; - * }; - * - * namespace asio { - * template <> struct is_match_condition - * : public boost::true_type {}; - * } // namespace asio - * ... - * void handler(const boost::system::error_code& e, std::size_t size); - * ... - * std::string data; - * boost::asio::async_read_until(s, data, match_char('a'), handler); - * @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, - MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if::value>::type* = 0); - -#if !defined(BOOST_ASIO_NO_IOSTREAM) - -/// Start an asynchronous operation to read data into a streambuf until it -/// contains a specified delimiter. -/** - * This function is used to asynchronously read data into the specified - * streambuf until the streambuf's get area contains the specified delimiter. - * The function call always returns immediately. The asynchronous operation - * will continue until one of the following conditions is true: - * - * @li The get area of the streambuf contains the specified delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the streambuf's get area already contains the delimiter, this asynchronous - * operation completes immediately. The program must ensure that the stream - * performs no other read operations (such as async_read, async_read_until, the - * stream's async_read_some function, or any other composed operations that - * perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. Ownership of - * the streambuf is retained by the caller, which must guarantee that it remains - * valid until the handler is called. - * - * @param delim The delimiter character. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the streambuf's get - * // area up to and including the delimiter. - * // 0 if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the streambuf may - * contain additional data beyond the delimiter. An application will typically - * leave that data in the streambuf for a subsequent async_read_until operation - * to examine. - * - * @par Example - * To asynchronously read data into a streambuf until a newline is encountered: - * @code boost::asio::streambuf b; - * ... - * void handler(const boost::system::error_code& e, std::size_t size) - * { - * if (!e) - * { - * std::istream is(&b); - * std::string line; - * std::getline(is, line); - * ... - * } - * } - * ... - * boost::asio::async_read_until(s, b, '\n', handler); @endcode - * After the @c async_read_until operation completes successfully, the buffer - * @c b contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode - * The call to @c std::getline then extracts the data up to and including the - * newline (which is discarded), so that the string @c line contains: - * @code { 'a', 'b', ..., 'c' } @endcode - * The remaining data is left in the buffer @c b as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c async_read_until operation. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - boost::asio::basic_streambuf& b, - char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -/// Start an asynchronous operation to read data into a streambuf until it -/// contains a specified delimiter. -/** - * This function is used to asynchronously read data into the specified - * streambuf until the streambuf's get area contains the specified delimiter. - * The function call always returns immediately. The asynchronous operation - * will continue until one of the following conditions is true: - * - * @li The get area of the streambuf contains the specified delimiter. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the streambuf's get area already contains the delimiter, this asynchronous - * operation completes immediately. The program must ensure that the stream - * performs no other read operations (such as async_read, async_read_until, the - * stream's async_read_some function, or any other composed operations that - * perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. Ownership of - * the streambuf is retained by the caller, which must guarantee that it remains - * valid until the handler is called. - * - * @param delim The delimiter string. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the streambuf's get - * // area up to and including the delimiter. - * // 0 if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the streambuf may - * contain additional data beyond the delimiter. An application will typically - * leave that data in the streambuf for a subsequent async_read_until operation - * to examine. - * - * @par Example - * To asynchronously read data into a streambuf until a newline is encountered: - * @code boost::asio::streambuf b; - * ... - * void handler(const boost::system::error_code& e, std::size_t size) - * { - * if (!e) - * { - * std::istream is(&b); - * std::string line; - * std::getline(is, line); - * ... - * } - * } - * ... - * boost::asio::async_read_until(s, b, "\r\n", handler); @endcode - * After the @c async_read_until operation completes successfully, the buffer - * @c b contains the delimiter: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c std::getline then extracts the data up to and including the - * newline (which is discarded), so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r' } @endcode - * The remaining data is left in the buffer @c b as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c async_read_until operation. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - boost::asio::basic_streambuf& b, - BOOST_ASIO_STRING_VIEW_PARAM delim, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ - || defined(GENERATING_DOCUMENTATION) - -/// Start an asynchronous operation to read data into a streambuf until some -/// part of its data matches a regular expression. -/** - * This function is used to asynchronously read data into the specified - * streambuf until the streambuf's get area contains some data that matches a - * regular expression. The function call always returns immediately. The - * asynchronous operation will continue until one of the following conditions - * is true: - * - * @li A substring of the streambuf's get area matches the regular expression. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the streambuf's get area already contains data that matches the regular - * expression, this asynchronous operation completes immediately. The program - * must ensure that the stream performs no other read operations (such as - * async_read, async_read_until, the stream's async_read_some function, or any - * other composed operations that perform reads) until this operation - * completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. Ownership of - * the streambuf is retained by the caller, which must guarantee that it remains - * valid until the handler is called. - * - * @param expr The regular expression. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the streambuf's get - * // area up to and including the substring - * // that matches the regular. expression. - * // 0 if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the streambuf may - * contain additional data beyond that which matched the regular expression. An - * application will typically leave that data in the streambuf for a subsequent - * async_read_until operation to examine. - * - * @par Example - * To asynchronously read data into a streambuf until a CR-LF sequence is - * encountered: - * @code boost::asio::streambuf b; - * ... - * void handler(const boost::system::error_code& e, std::size_t size) - * { - * if (!e) - * { - * std::istream is(&b); - * std::string line; - * std::getline(is, line); - * ... - * } - * } - * ... - * boost::asio::async_read_until(s, b, boost::regex("\r\n"), handler); @endcode - * After the @c async_read_until operation completes successfully, the buffer - * @c b contains the data which matched the regular expression: - * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode - * The call to @c std::getline then extracts the data up to and including the - * newline (which is discarded), so that the string @c line contains: - * @code { 'a', 'b', ..., 'c', '\r' } @endcode - * The remaining data is left in the buffer @c b as follows: - * @code { 'd', 'e', ... } @endcode - * This data may be the start of a new line, to be extracted by a subsequent - * @c async_read_until operation. - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - boost::asio::basic_streambuf& b, const boost::regex& expr, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler); - -#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) - // || defined(GENERATING_DOCUMENTATION) - -/// Start an asynchronous operation to read data into a streambuf until a -/// function object indicates a match. -/** - * This function is used to asynchronously read data into the specified - * streambuf until a user-defined match condition function object, when applied - * to the data contained in the streambuf, indicates a successful match. The - * function call always returns immediately. The asynchronous operation will - * continue until one of the following conditions is true: - * - * @li The match condition function object returns a std::pair where the second - * element evaluates to true. - * - * @li An error occurred. - * - * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function, and is known as a composed operation. If - * the match condition function object already indicates a match, this - * asynchronous operation completes immediately. The program must ensure that - * the stream performs no other read operations (such as async_read, - * async_read_until, the stream's async_read_some function, or any other - * composed operations that perform reads) until this operation completes. - * - * @param s The stream from which the data is to be read. The type must support - * the AsyncReadStream concept. - * - * @param b A streambuf object into which the data will be read. - * - * @param match_condition The function object to be called to determine whether - * a match exists. The signature of the function object must be: - * @code pair match_condition(iterator begin, iterator end); - * @endcode - * where @c iterator represents the type: - * @code buffers_iterator::const_buffers_type> - * @endcode - * The iterator parameters @c begin and @c end define the range of bytes to be - * scanned to determine whether there is a match. The @c first member of the - * return value is an iterator marking one-past-the-end of the bytes that have - * been consumed by the match function. This iterator is used to calculate the - * @c begin parameter for any subsequent invocation of the match condition. The - * @c second member of the return value is true if a match has been found, false - * otherwise. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * // Result of operation. - * const boost::system::error_code& error, - * - * // The number of bytes in the streambuf's get - * // area that have been fully consumed by the - * // match function. O if an error occurred. - * std::size_t bytes_transferred - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation of - * the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note After a successful async_read_until operation, the streambuf may - * contain additional data beyond that which matched the function object. An - * application will typically leave that data in the streambuf for a subsequent - * async_read_until operation to examine. - * - * @note The default implementation of the @c is_match_condition type trait - * evaluates to true for function pointers and function objects with a - * @c result_type typedef. It must be specialised for other user-defined - * function objects. - * - * @par Examples - * To asynchronously read data into a streambuf until whitespace is encountered: - * @code typedef boost::asio::buffers_iterator< - * boost::asio::streambuf::const_buffers_type> iterator; - * - * std::pair - * match_whitespace(iterator begin, iterator end) - * { - * iterator i = begin; - * while (i != end) - * if (std::isspace(*i++)) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * ... - * void handler(const boost::system::error_code& e, std::size_t size); - * ... - * boost::asio::streambuf b; - * boost::asio::async_read_until(s, b, match_whitespace, handler); - * @endcode - * - * To asynchronously read data into a streambuf until a matching character is - * found: - * @code class match_char - * { - * public: - * explicit match_char(char c) : c_(c) {} - * - * template - * std::pair operator()( - * Iterator begin, Iterator end) const - * { - * Iterator i = begin; - * while (i != end) - * if (c_ == *i++) - * return std::make_pair(i, true); - * return std::make_pair(i, false); - * } - * - * private: - * char c_; - * }; - * - * namespace asio { - * template <> struct is_match_condition - * : public boost::true_type {}; - * } // namespace asio - * ... - * void handler(const boost::system::error_code& e, std::size_t size); - * ... - * boost::asio::streambuf b; - * boost::asio::async_read_until(s, b, match_char('a'), handler); - * @endcode - */ -template -BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) -async_read_until(AsyncReadStream& s, - boost::asio::basic_streambuf& b, - MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if::value>::type* = 0); - -#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) - -/*@}*/ - -} // namespace asio -} // namespace boost - -#include - -#include - -#endif // BOOST_ASIO_READ_UNTIL_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/seq_packet_socket_service.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/seq_packet_socket_service.hpp deleted file mode 100644 index 4688f302..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/seq_packet_socket_service.hpp +++ /dev/null @@ -1,418 +0,0 @@ -// -// seq_packet_socket_service.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP -#define BOOST_ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#include -#include -#include -#include -#include - -#if defined(BOOST_ASIO_WINDOWS_RUNTIME) -# include -#elif defined(BOOST_ASIO_HAS_IOCP) -# include -#else -# include -#endif - -#include - -namespace boost { -namespace asio { - -/// Default service implementation for a sequenced packet socket. -template -class seq_packet_socket_service -#if defined(GENERATING_DOCUMENTATION) - : public boost::asio::io_context::service -#else - : public boost::asio::detail::service_base< - seq_packet_socket_service > -#endif -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The unique service identifier. - static boost::asio::io_context::id id; -#endif - - /// The protocol type. - typedef Protocol protocol_type; - - /// The endpoint type. - typedef typename Protocol::endpoint endpoint_type; - -private: - // The type of the platform-specific implementation. -#if defined(BOOST_ASIO_WINDOWS_RUNTIME) - typedef detail::null_socket_service service_impl_type; -#elif defined(BOOST_ASIO_HAS_IOCP) - typedef detail::win_iocp_socket_service service_impl_type; -#else - typedef detail::reactive_socket_service service_impl_type; -#endif - -public: - /// The type of a sequenced packet socket implementation. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined implementation_type; -#else - typedef typename service_impl_type::implementation_type implementation_type; -#endif - - /// The native socket type. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined native_handle_type; -#else - typedef typename service_impl_type::native_handle_type native_handle_type; -#endif - - /// Construct a new sequenced packet socket service for the specified - /// io_context. - explicit seq_packet_socket_service(boost::asio::io_context& io_context) - : boost::asio::detail::service_base< - seq_packet_socket_service >(io_context), - service_impl_(io_context) - { - } - - /// Construct a new sequenced packet socket implementation. - void construct(implementation_type& impl) - { - service_impl_.construct(impl); - } - -#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move-construct a new sequenced packet socket implementation. - void move_construct(implementation_type& impl, - implementation_type& other_impl) - { - service_impl_.move_construct(impl, other_impl); - } - - /// Move-assign from another sequenced packet socket implementation. - void move_assign(implementation_type& impl, - seq_packet_socket_service& other_service, - implementation_type& other_impl) - { - service_impl_.move_assign(impl, other_service.service_impl_, other_impl); - } - - // All socket services have access to each other's implementations. - template friend class seq_packet_socket_service; - - /// Move-construct a new sequenced packet socket implementation from another - /// protocol type. - template - void converting_move_construct(implementation_type& impl, - seq_packet_socket_service& other_service, - typename seq_packet_socket_service< - Protocol1>::implementation_type& other_impl, - typename enable_if::value>::type* = 0) - { - service_impl_.template converting_move_construct( - impl, other_service.service_impl_, other_impl); - } -#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Destroy a sequenced packet socket implementation. - void destroy(implementation_type& impl) - { - service_impl_.destroy(impl); - } - - /// Open a sequenced packet socket. - BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl, - const protocol_type& protocol, boost::system::error_code& ec) - { - if (protocol.type() == BOOST_ASIO_OS_DEF(SOCK_SEQPACKET)) - service_impl_.open(impl, protocol, ec); - else - ec = boost::asio::error::invalid_argument; - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Assign an existing native socket to a sequenced packet socket. - BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl, - const protocol_type& protocol, const native_handle_type& native_socket, - boost::system::error_code& ec) - { - service_impl_.assign(impl, protocol, native_socket, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the socket is open. - bool is_open(const implementation_type& impl) const - { - return service_impl_.is_open(impl); - } - - /// Close a sequenced packet socket implementation. - BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.close(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Release ownership of the underlying socket. - native_handle_type release(implementation_type& impl, - boost::system::error_code& ec) - { - return service_impl_.release(impl, ec); - } - - /// Get the native socket implementation. - native_handle_type native_handle(implementation_type& impl) - { - return service_impl_.native_handle(impl); - } - - /// Cancel all asynchronous operations associated with the socket. - BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.cancel(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the socket is at the out-of-band data mark. - bool at_mark(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.at_mark(impl, ec); - } - - /// Determine the number of bytes available for reading. - std::size_t available(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.available(impl, ec); - } - - /// Bind the sequenced packet socket to the specified local endpoint. - BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl, - const endpoint_type& endpoint, boost::system::error_code& ec) - { - service_impl_.bind(impl, endpoint, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Connect the sequenced packet socket to the specified endpoint. - BOOST_ASIO_SYNC_OP_VOID connect(implementation_type& impl, - const endpoint_type& peer_endpoint, boost::system::error_code& ec) - { - service_impl_.connect(impl, peer_endpoint, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Start an asynchronous connect. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler, - void (boost::system::error_code)) - async_connect(implementation_type& impl, - const endpoint_type& peer_endpoint, - BOOST_ASIO_MOVE_ARG(ConnectHandler) handler) - { - async_completion init(handler); - - service_impl_.async_connect(impl, peer_endpoint, init.completion_handler); - - return init.result.get(); - } - - /// Set a socket option. - template - BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl, - const SettableSocketOption& option, boost::system::error_code& ec) - { - service_impl_.set_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get a socket option. - template - BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl, - GettableSocketOption& option, boost::system::error_code& ec) const - { - service_impl_.get_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Perform an IO control command on the socket. - template - BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl, - IoControlCommand& command, boost::system::error_code& ec) - { - service_impl_.io_control(impl, command, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Gets the non-blocking mode of the socket. - bool non_blocking(const implementation_type& impl) const - { - return service_impl_.non_blocking(impl); - } - - /// Sets the non-blocking mode of the socket. - BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl, - bool mode, boost::system::error_code& ec) - { - service_impl_.non_blocking(impl, mode, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Gets the non-blocking mode of the native socket implementation. - bool native_non_blocking(const implementation_type& impl) const - { - return service_impl_.native_non_blocking(impl); - } - - /// Sets the non-blocking mode of the native socket implementation. - BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl, - bool mode, boost::system::error_code& ec) - { - service_impl_.native_non_blocking(impl, mode, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get the local endpoint. - endpoint_type local_endpoint(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.local_endpoint(impl, ec); - } - - /// Get the remote endpoint. - endpoint_type remote_endpoint(const implementation_type& impl, - boost::system::error_code& ec) const - { - return service_impl_.remote_endpoint(impl, ec); - } - - /// Disable sends or receives on the socket. - BOOST_ASIO_SYNC_OP_VOID shutdown(implementation_type& impl, - socket_base::shutdown_type what, boost::system::error_code& ec) - { - service_impl_.shutdown(impl, what, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Wait for the socket to become ready to read, ready to write, or to have - /// pending error conditions. - BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl, - socket_base::wait_type w, boost::system::error_code& ec) - { - service_impl_.wait(impl, w, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Asynchronously wait for the socket to become ready to read, ready to - /// write, or to have pending error conditions. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler, - void (boost::system::error_code)) - async_wait(implementation_type& impl, socket_base::wait_type w, - BOOST_ASIO_MOVE_ARG(WaitHandler) handler) - { - async_completion init(handler); - - service_impl_.async_wait(impl, w, init.completion_handler); - - return init.result.get(); - } - - /// Send the given data to the peer. - template - std::size_t send(implementation_type& impl, - const ConstBufferSequence& buffers, - socket_base::message_flags flags, boost::system::error_code& ec) - { - return service_impl_.send(impl, buffers, flags, ec); - } - - /// Start an asynchronous send. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_send(implementation_type& impl, - const ConstBufferSequence& buffers, - socket_base::message_flags flags, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - async_completion init(handler); - - service_impl_.async_send(impl, buffers, flags, init.completion_handler); - - return init.result.get(); - } - - /// Receive some data from the peer. - template - std::size_t receive(implementation_type& impl, - const MutableBufferSequence& buffers, socket_base::message_flags in_flags, - socket_base::message_flags& out_flags, boost::system::error_code& ec) - { - return service_impl_.receive_with_flags(impl, - buffers, in_flags, out_flags, ec); - } - - /// Start an asynchronous receive. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_receive(implementation_type& impl, - const MutableBufferSequence& buffers, socket_base::message_flags in_flags, - socket_base::message_flags& out_flags, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - async_completion init(handler); - - service_impl_.async_receive_with_flags(impl, - buffers, in_flags, out_flags, init.completion_handler); - - return init.result.get(); - } - -private: - // Destroy all user-defined handler objects owned by the service. - void shutdown() - { - service_impl_.shutdown(); - } - - // The platform-specific implementation. - service_impl_type service_impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#endif // BOOST_ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port.hpp deleted file mode 100644 index 72a52a52..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port.hpp +++ /dev/null @@ -1,771 +0,0 @@ -// -// serial_port.hpp -// ~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) -// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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) -// - -#ifndef BOOST_ASIO_SERIAL_PORT_HPP -#define BOOST_ASIO_SERIAL_PORT_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \ - || defined(GENERATING_DOCUMENTATION) - -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(BOOST_ASIO_HAS_MOVE) -# include -#endif // defined(BOOST_ASIO_HAS_MOVE) - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -# include -#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -# if defined(BOOST_ASIO_HAS_IOCP) -# include -# define BOOST_ASIO_SVC_T detail::win_iocp_serial_port_service -# else -# include -# define BOOST_ASIO_SVC_T detail::reactive_serial_port_service -# endif -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#include - -namespace boost { -namespace asio { - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -// Typedef for the typical usage of a serial port. -typedef basic_serial_port<> serial_port; -#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -/// Provides serial port functionality. -/** - * The serial_port class provides a wrapper over serial port functionality. - * - * @par Thread Safety - * @e Distinct @e objects: Safe.@n - * @e Shared @e objects: Unsafe. - */ -class serial_port - : BOOST_ASIO_SVC_ACCESS basic_io_object, - public serial_port_base -{ -public: - /// The type of the executor associated with the object. - typedef io_context::executor_type executor_type; - - /// The native representation of a serial port. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined native_handle_type; -#else - typedef BOOST_ASIO_SVC_T::native_handle_type native_handle_type; -#endif - - /// A basic_serial_port is always the lowest layer. - typedef serial_port lowest_layer_type; - - /// Construct a serial_port without opening it. - /** - * This constructor creates a serial port without opening it. - * - * @param io_context The io_context object that the serial port will use to - * dispatch handlers for any asynchronous operations performed on the port. - */ - explicit serial_port(boost::asio::io_context& io_context) - : basic_io_object(io_context) - { - } - - /// Construct and open a serial_port. - /** - * This constructor creates and opens a serial port for the specified device - * name. - * - * @param io_context The io_context object that the serial port will use to - * dispatch handlers for any asynchronous operations performed on the port. - * - * @param device The platform-specific device name for this serial - * port. - */ - explicit serial_port(boost::asio::io_context& io_context, - const char* device) - : basic_io_object(io_context) - { - boost::system::error_code ec; - this->get_service().open(this->get_implementation(), device, ec); - boost::asio::detail::throw_error(ec, "open"); - } - - /// Construct and open a serial_port. - /** - * This constructor creates and opens a serial port for the specified device - * name. - * - * @param io_context The io_context object that the serial port will use to - * dispatch handlers for any asynchronous operations performed on the port. - * - * @param device The platform-specific device name for this serial - * port. - */ - explicit serial_port(boost::asio::io_context& io_context, - const std::string& device) - : basic_io_object(io_context) - { - boost::system::error_code ec; - this->get_service().open(this->get_implementation(), device, ec); - boost::asio::detail::throw_error(ec, "open"); - } - - /// Construct a serial_port on an existing native serial port. - /** - * This constructor creates a serial port object to hold an existing native - * serial port. - * - * @param io_context The io_context object that the serial port will use to - * dispatch handlers for any asynchronous operations performed on the port. - * - * @param native_serial_port A native serial port. - * - * @throws boost::system::system_error Thrown on failure. - */ - serial_port(boost::asio::io_context& io_context, - const native_handle_type& native_serial_port) - : basic_io_object(io_context) - { - boost::system::error_code ec; - this->get_service().assign(this->get_implementation(), - native_serial_port, ec); - boost::asio::detail::throw_error(ec, "assign"); - } - -#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move-construct a serial_port from another. - /** - * This constructor moves a serial port from one object to another. - * - * @param other The other serial_port object from which the move will - * occur. - * - * @note Following the move, the moved-from object is in the same state as if - * constructed using the @c serial_port(io_context&) constructor. - */ - serial_port(serial_port&& other) - : basic_io_object(std::move(other)) - { - } - - /// Move-assign a serial_port from another. - /** - * This assignment operator moves a serial port from one object to another. - * - * @param other The other serial_port object from which the move will - * occur. - * - * @note Following the move, the moved-from object is in the same state as if - * constructed using the @c serial_port(io_context&) constructor. - */ - serial_port& operator=(serial_port&& other) - { - basic_io_object::operator=(std::move(other)); - return *this; - } -#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Destroys the serial port. - /** - * This function destroys the serial port, cancelling any outstanding - * asynchronous wait operations associated with the serial port as if by - * calling @c cancel. - */ - ~serial_port() - { - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - /** - * This function may be used to obtain the io_context object that the I/O - * object uses to dispatch handlers for asynchronous operations. - * - * @return A reference to the io_context object that the I/O object will use - * to dispatch handlers. Ownership is not transferred to the caller. - */ - boost::asio::io_context& get_io_context() - { - return basic_io_object::get_io_context(); - } - - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - /** - * This function may be used to obtain the io_context object that the I/O - * object uses to dispatch handlers for asynchronous operations. - * - * @return A reference to the io_context object that the I/O object will use - * to dispatch handlers. Ownership is not transferred to the caller. - */ - boost::asio::io_context& get_io_service() - { - return basic_io_object::get_io_service(); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Get the executor associated with the object. - executor_type get_executor() BOOST_ASIO_NOEXCEPT - { - return basic_io_object::get_executor(); - } - - /// Get a reference to the lowest layer. - /** - * This function returns a reference to the lowest layer in a stack of - * layers. Since a serial_port cannot contain any further layers, it simply - * returns a reference to itself. - * - * @return A reference to the lowest layer in the stack of layers. Ownership - * is not transferred to the caller. - */ - lowest_layer_type& lowest_layer() - { - return *this; - } - - /// Get a const reference to the lowest layer. - /** - * This function returns a const reference to the lowest layer in a stack of - * layers. Since a serial_port cannot contain any further layers, it simply - * returns a reference to itself. - * - * @return A const reference to the lowest layer in the stack of layers. - * Ownership is not transferred to the caller. - */ - const lowest_layer_type& lowest_layer() const - { - return *this; - } - - /// Open the serial port using the specified device name. - /** - * This function opens the serial port for the specified device name. - * - * @param device The platform-specific device name. - * - * @throws boost::system::system_error Thrown on failure. - */ - void open(const std::string& device) - { - boost::system::error_code ec; - this->get_service().open(this->get_implementation(), device, ec); - boost::asio::detail::throw_error(ec, "open"); - } - - /// Open the serial port using the specified device name. - /** - * This function opens the serial port using the given platform-specific - * device name. - * - * @param device The platform-specific device name. - * - * @param ec Set the indicate what error occurred, if any. - */ - BOOST_ASIO_SYNC_OP_VOID open(const std::string& device, - boost::system::error_code& ec) - { - this->get_service().open(this->get_implementation(), device, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Assign an existing native serial port to the serial port. - /* - * This function opens the serial port to hold an existing native serial port. - * - * @param native_serial_port A native serial port. - * - * @throws boost::system::system_error Thrown on failure. - */ - void assign(const native_handle_type& native_serial_port) - { - boost::system::error_code ec; - this->get_service().assign(this->get_implementation(), - native_serial_port, ec); - boost::asio::detail::throw_error(ec, "assign"); - } - - /// Assign an existing native serial port to the serial port. - /* - * This function opens the serial port to hold an existing native serial port. - * - * @param native_serial_port A native serial port. - * - * @param ec Set to indicate what error occurred, if any. - */ - BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port, - boost::system::error_code& ec) - { - this->get_service().assign(this->get_implementation(), - native_serial_port, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the serial port is open. - bool is_open() const - { - return this->get_service().is_open(this->get_implementation()); - } - - /// Close the serial port. - /** - * This function is used to close the serial port. Any asynchronous read or - * write operations will be cancelled immediately, and will complete with the - * boost::asio::error::operation_aborted error. - * - * @throws boost::system::system_error Thrown on failure. - */ - void close() - { - boost::system::error_code ec; - this->get_service().close(this->get_implementation(), ec); - boost::asio::detail::throw_error(ec, "close"); - } - - /// Close the serial port. - /** - * This function is used to close the serial port. Any asynchronous read or - * write operations will be cancelled immediately, and will complete with the - * boost::asio::error::operation_aborted error. - * - * @param ec Set to indicate what error occurred, if any. - */ - BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec) - { - this->get_service().close(this->get_implementation(), ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get the native serial port representation. - /** - * This function may be used to obtain the underlying representation of the - * serial port. This is intended to allow access to native serial port - * functionality that is not otherwise provided. - */ - native_handle_type native_handle() - { - return this->get_service().native_handle(this->get_implementation()); - } - - /// Cancel all asynchronous operations associated with the serial port. - /** - * This function causes all outstanding asynchronous read or write operations - * to finish immediately, and the handlers for cancelled operations will be - * passed the boost::asio::error::operation_aborted error. - * - * @throws boost::system::system_error Thrown on failure. - */ - void cancel() - { - boost::system::error_code ec; - this->get_service().cancel(this->get_implementation(), ec); - boost::asio::detail::throw_error(ec, "cancel"); - } - - /// Cancel all asynchronous operations associated with the serial port. - /** - * This function causes all outstanding asynchronous read or write operations - * to finish immediately, and the handlers for cancelled operations will be - * passed the boost::asio::error::operation_aborted error. - * - * @param ec Set to indicate what error occurred, if any. - */ - BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec) - { - this->get_service().cancel(this->get_implementation(), ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Send a break sequence to the serial port. - /** - * This function causes a break sequence of platform-specific duration to be - * sent out the serial port. - * - * @throws boost::system::system_error Thrown on failure. - */ - void send_break() - { - boost::system::error_code ec; - this->get_service().send_break(this->get_implementation(), ec); - boost::asio::detail::throw_error(ec, "send_break"); - } - - /// Send a break sequence to the serial port. - /** - * This function causes a break sequence of platform-specific duration to be - * sent out the serial port. - * - * @param ec Set to indicate what error occurred, if any. - */ - BOOST_ASIO_SYNC_OP_VOID send_break(boost::system::error_code& ec) - { - this->get_service().send_break(this->get_implementation(), ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Set an option on the serial port. - /** - * This function is used to set an option on the serial port. - * - * @param option The option value to be set on the serial port. - * - * @throws boost::system::system_error Thrown on failure. - * - * @sa SettableSerialPortOption @n - * boost::asio::serial_port_base::baud_rate @n - * boost::asio::serial_port_base::flow_control @n - * boost::asio::serial_port_base::parity @n - * boost::asio::serial_port_base::stop_bits @n - * boost::asio::serial_port_base::character_size - */ - template - void set_option(const SettableSerialPortOption& option) - { - boost::system::error_code ec; - this->get_service().set_option(this->get_implementation(), option, ec); - boost::asio::detail::throw_error(ec, "set_option"); - } - - /// Set an option on the serial port. - /** - * This function is used to set an option on the serial port. - * - * @param option The option value to be set on the serial port. - * - * @param ec Set to indicate what error occurred, if any. - * - * @sa SettableSerialPortOption @n - * boost::asio::serial_port_base::baud_rate @n - * boost::asio::serial_port_base::flow_control @n - * boost::asio::serial_port_base::parity @n - * boost::asio::serial_port_base::stop_bits @n - * boost::asio::serial_port_base::character_size - */ - template - BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option, - boost::system::error_code& ec) - { - this->get_service().set_option(this->get_implementation(), option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get an option from the serial port. - /** - * This function is used to get the current value of an option on the serial - * port. - * - * @param option The option value to be obtained from the serial port. - * - * @throws boost::system::system_error Thrown on failure. - * - * @sa GettableSerialPortOption @n - * boost::asio::serial_port_base::baud_rate @n - * boost::asio::serial_port_base::flow_control @n - * boost::asio::serial_port_base::parity @n - * boost::asio::serial_port_base::stop_bits @n - * boost::asio::serial_port_base::character_size - */ - template - void get_option(GettableSerialPortOption& option) - { - boost::system::error_code ec; - this->get_service().get_option(this->get_implementation(), option, ec); - boost::asio::detail::throw_error(ec, "get_option"); - } - - /// Get an option from the serial port. - /** - * This function is used to get the current value of an option on the serial - * port. - * - * @param option The option value to be obtained from the serial port. - * - * @param ec Set to indicate what error occurred, if any. - * - * @sa GettableSerialPortOption @n - * boost::asio::serial_port_base::baud_rate @n - * boost::asio::serial_port_base::flow_control @n - * boost::asio::serial_port_base::parity @n - * boost::asio::serial_port_base::stop_bits @n - * boost::asio::serial_port_base::character_size - */ - template - BOOST_ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option, - boost::system::error_code& ec) - { - this->get_service().get_option(this->get_implementation(), option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Write some data to the serial port. - /** - * This function is used to write data to the serial port. The function call - * will block until one or more bytes of the data has been written - * successfully, or until an error occurs. - * - * @param buffers One or more data buffers to be written to the serial port. - * - * @returns The number of bytes written. - * - * @throws boost::system::system_error Thrown on failure. An error code of - * boost::asio::error::eof indicates that the connection was closed by the - * peer. - * - * @note The write_some operation may not transmit all of the data to the - * peer. Consider using the @ref write function if you need to ensure that - * all data is written before the blocking operation completes. - * - * @par Example - * To write a single data buffer use the @ref buffer function as follows: - * @code - * serial_port.write_some(boost::asio::buffer(data, size)); - * @endcode - * See the @ref buffer documentation for information on writing multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ - template - std::size_t write_some(const ConstBufferSequence& buffers) - { - boost::system::error_code ec; - std::size_t s = this->get_service().write_some( - this->get_implementation(), buffers, ec); - boost::asio::detail::throw_error(ec, "write_some"); - return s; - } - - /// Write some data to the serial port. - /** - * This function is used to write data to the serial port. The function call - * will block until one or more bytes of the data has been written - * successfully, or until an error occurs. - * - * @param buffers One or more data buffers to be written to the serial port. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes written. Returns 0 if an error occurred. - * - * @note The write_some operation may not transmit all of the data to the - * peer. Consider using the @ref write function if you need to ensure that - * all data is written before the blocking operation completes. - */ - template - std::size_t write_some(const ConstBufferSequence& buffers, - boost::system::error_code& ec) - { - return this->get_service().write_some( - this->get_implementation(), buffers, ec); - } - - /// Start an asynchronous write. - /** - * This function is used to asynchronously write data to the serial port. - * The function call always returns immediately. - * - * @param buffers One or more data buffers to be written to the serial port. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param handler The handler to be called when the write operation completes. - * Copies will be made of the handler as required. The function signature of - * the handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * std::size_t bytes_transferred // Number of bytes written. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note The write operation may not transmit all of the data to the peer. - * Consider using the @ref async_write function if you need to ensure that all - * data is written before the asynchronous operation completes. - * - * @par Example - * To write a single data buffer use the @ref buffer function as follows: - * @code - * serial_port.async_write_some(boost::asio::buffer(data, size), handler); - * @endcode - * See the @ref buffer documentation for information on writing multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_write_some(const ConstBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - // If you get an error on the following line it means that your handler does - // not meet the documented type requirements for a WriteHandler. - BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check; - - async_completion init(handler); - - this->get_service().async_write_some( - this->get_implementation(), buffers, init.completion_handler); - - return init.result.get(); - } - - /// Read some data from the serial port. - /** - * This function is used to read data from the serial port. The function - * call will block until one or more bytes of data has been read successfully, - * or until an error occurs. - * - * @param buffers One or more buffers into which the data will be read. - * - * @returns The number of bytes read. - * - * @throws boost::system::system_error Thrown on failure. An error code of - * boost::asio::error::eof indicates that the connection was closed by the - * peer. - * - * @note The read_some operation may not read all of the requested number of - * bytes. Consider using the @ref read function if you need to ensure that - * the requested amount of data is read before the blocking operation - * completes. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code - * serial_port.read_some(boost::asio::buffer(data, size)); - * @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ - template - std::size_t read_some(const MutableBufferSequence& buffers) - { - boost::system::error_code ec; - std::size_t s = this->get_service().read_some( - this->get_implementation(), buffers, ec); - boost::asio::detail::throw_error(ec, "read_some"); - return s; - } - - /// Read some data from the serial port. - /** - * This function is used to read data from the serial port. The function - * call will block until one or more bytes of data has been read successfully, - * or until an error occurs. - * - * @param buffers One or more buffers into which the data will be read. - * - * @param ec Set to indicate what error occurred, if any. - * - * @returns The number of bytes read. Returns 0 if an error occurred. - * - * @note The read_some operation may not read all of the requested number of - * bytes. Consider using the @ref read function if you need to ensure that - * the requested amount of data is read before the blocking operation - * completes. - */ - template - std::size_t read_some(const MutableBufferSequence& buffers, - boost::system::error_code& ec) - { - return this->get_service().read_some( - this->get_implementation(), buffers, ec); - } - - /// Start an asynchronous read. - /** - * This function is used to asynchronously read data from the serial port. - * The function call always returns immediately. - * - * @param buffers One or more buffers into which the data will be read. - * Although the buffers object may be copied as necessary, ownership of the - * underlying memory blocks is retained by the caller, which must guarantee - * that they remain valid until the handler is called. - * - * @param handler The handler to be called when the read operation completes. - * Copies will be made of the handler as required. The function signature of - * the handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * std::size_t bytes_transferred // Number of bytes read. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - * - * @note The read operation may not read all of the requested number of bytes. - * Consider using the @ref async_read function if you need to ensure that the - * requested amount of data is read before the asynchronous operation - * completes. - * - * @par Example - * To read into a single data buffer use the @ref buffer function as follows: - * @code - * serial_port.async_read_some(boost::asio::buffer(data, size), handler); - * @endcode - * See the @ref buffer documentation for information on reading into multiple - * buffers in one go, and how to use it with arrays, boost::array or - * std::vector. - */ - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_read_some(const MutableBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - // If you get an error on the following line it means that your handler does - // not meet the documented type requirements for a ReadHandler. - BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check; - - async_completion init(handler); - - this->get_service().async_read_some( - this->get_implementation(), buffers, init.completion_handler); - - return init.result.get(); - } -}; -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -} // namespace asio -} // namespace boost - -#include - -#if !defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -# undef BOOST_ASIO_SVC_T -#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT) - // || defined(GENERATING_DOCUMENTATION) - -#endif // BOOST_ASIO_SERIAL_PORT_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_base.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_base.hpp deleted file mode 100644 index b2a83670..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_base.hpp +++ /dev/null @@ -1,169 +0,0 @@ -// -// serial_port_base.hpp -// ~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) -// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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) -// - -#ifndef BOOST_ASIO_SERIAL_PORT_BASE_HPP -#define BOOST_ASIO_SERIAL_PORT_BASE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \ - || defined(GENERATING_DOCUMENTATION) - -#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) -# include -#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) - -#include -#include - -#if defined(GENERATING_DOCUMENTATION) -# define BOOST_ASIO_OPTION_STORAGE implementation_defined -#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) -# define BOOST_ASIO_OPTION_STORAGE DCB -#else -# define BOOST_ASIO_OPTION_STORAGE termios -#endif - -#include - -namespace boost { -namespace asio { - -/// The serial_port_base class is used as a base for the basic_serial_port class -/// template so that we have a common place to define the serial port options. -class serial_port_base -{ -public: - /// Serial port option to permit changing the baud rate. - /** - * Implements changing the baud rate for a given serial port. - */ - class baud_rate - { - public: - explicit baud_rate(unsigned int rate = 0); - unsigned int value() const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store( - BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec) const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load( - const BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec); - private: - unsigned int value_; - }; - - /// Serial port option to permit changing the flow control. - /** - * Implements changing the flow control for a given serial port. - */ - class flow_control - { - public: - enum type { none, software, hardware }; - BOOST_ASIO_DECL explicit flow_control(type t = none); - type value() const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store( - BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec) const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load( - const BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec); - private: - type value_; - }; - - /// Serial port option to permit changing the parity. - /** - * Implements changing the parity for a given serial port. - */ - class parity - { - public: - enum type { none, odd, even }; - BOOST_ASIO_DECL explicit parity(type t = none); - type value() const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store( - BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec) const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load( - const BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec); - private: - type value_; - }; - - /// Serial port option to permit changing the number of stop bits. - /** - * Implements changing the number of stop bits for a given serial port. - */ - class stop_bits - { - public: - enum type { one, onepointfive, two }; - BOOST_ASIO_DECL explicit stop_bits(type t = one); - type value() const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store( - BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec) const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load( - const BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec); - private: - type value_; - }; - - /// Serial port option to permit changing the character size. - /** - * Implements changing the character size for a given serial port. - */ - class character_size - { - public: - BOOST_ASIO_DECL explicit character_size(unsigned int t = 8); - unsigned int value() const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store( - BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec) const; - BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load( - const BOOST_ASIO_OPTION_STORAGE& storage, - boost::system::error_code& ec); - private: - unsigned int value_; - }; - -protected: - /// Protected destructor to prevent deletion through this type. - ~serial_port_base() - { - } -}; - -} // namespace asio -} // namespace boost - -#include - -#undef BOOST_ASIO_OPTION_STORAGE - -#include -#if defined(BOOST_ASIO_HEADER_ONLY) -# include -#endif // defined(BOOST_ASIO_HEADER_ONLY) - -#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT) - // || defined(GENERATING_DOCUMENTATION) - -#endif // BOOST_ASIO_SERIAL_PORT_BASE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_service.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_service.hpp deleted file mode 100644 index 88a1f16e..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/serial_port_service.hpp +++ /dev/null @@ -1,251 +0,0 @@ -// -// serial_port_service.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_SERIAL_PORT_SERVICE_HPP -#define BOOST_ASIO_SERIAL_PORT_SERVICE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \ - || defined(GENERATING_DOCUMENTATION) - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Default service implementation for a serial port. -class serial_port_service -#if defined(GENERATING_DOCUMENTATION) - : public boost::asio::io_context::service -#else - : public boost::asio::detail::service_base -#endif -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The unique service identifier. - static boost::asio::io_context::id id; -#endif - -private: - // The type of the platform-specific implementation. -#if defined(BOOST_ASIO_HAS_IOCP) - typedef detail::win_iocp_serial_port_service service_impl_type; -#else - typedef detail::reactive_serial_port_service service_impl_type; -#endif - -public: - /// The type of a serial port implementation. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined implementation_type; -#else - typedef service_impl_type::implementation_type implementation_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_context. - explicit serial_port_service(boost::asio::io_context& io_context) - : boost::asio::detail::service_base(io_context), - service_impl_(io_context) - { - } - - /// 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) - { - service_impl_.destroy(impl); - } - - /// Open a serial port. - BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl, - const std::string& device, boost::system::error_code& ec) - { - service_impl_.open(impl, device, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Assign an existing native handle to a serial port. - BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl, - const native_handle_type& handle, boost::system::error_code& ec) - { - service_impl_.assign(impl, handle, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Determine whether the handle is open. - bool is_open(const implementation_type& impl) const - { - return service_impl_.is_open(impl); - } - - /// Close a serial port implementation. - BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.close(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// 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. - BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.cancel(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Set a serial port option. - template - BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl, - const SettableSerialPortOption& option, boost::system::error_code& ec) - { - service_impl_.set_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Get a serial port option. - template - BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl, - GettableSerialPortOption& option, boost::system::error_code& ec) const - { - service_impl_.get_option(impl, option, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Send a break sequence to the serial port. - BOOST_ASIO_SYNC_OP_VOID send_break(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.send_break(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Write the given data to the stream. - template - std::size_t write_some(implementation_type& impl, - const ConstBufferSequence& buffers, boost::system::error_code& ec) - { - return service_impl_.write_some(impl, buffers, ec); - } - - /// Start an asynchronous write. - template - BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) - async_write_some(implementation_type& impl, - const ConstBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(WriteHandler) handler) - { - async_completion init(handler); - - service_impl_.async_write_some(impl, buffers, init.completion_handler); - - return init.result.get(); - } - - /// Read some data from the stream. - template - std::size_t read_some(implementation_type& impl, - const MutableBufferSequence& buffers, boost::system::error_code& ec) - { - return service_impl_.read_some(impl, buffers, ec); - } - - /// Start an asynchronous read. - template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, - void (boost::system::error_code, std::size_t)) - async_read_some(implementation_type& impl, - const MutableBufferSequence& buffers, - BOOST_ASIO_MOVE_ARG(ReadHandler) handler) - { - async_completion init(handler); - - service_impl_.async_read_some(impl, buffers, init.completion_handler); - - return init.result.get(); - } - -private: - // Destroy all user-defined handler objects owned by the service. - void shutdown() - { - service_impl_.shutdown(); - } - - // The platform-specific implementation. - service_impl_type service_impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT) - // || defined(GENERATING_DOCUMENTATION) - -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#endif // BOOST_ASIO_SERIAL_PORT_SERVICE_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set.hpp deleted file mode 100644 index 6d724e3f..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set.hpp +++ /dev/null @@ -1,449 +0,0 @@ -// -// signal_set.hpp -// ~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_SIGNAL_SET_HPP -#define BOOST_ASIO_SIGNAL_SET_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -# include -#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -# include -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -namespace boost { -namespace asio { - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -// Typedef for the typical usage of a signal set. -typedef basic_signal_set<> signal_set; -#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -/// Provides signal functionality. -/** - * The signal_set class provides the ability to perform an asynchronous wait - * for one or more signals to occur. - * - * @par Thread Safety - * @e Distinct @e objects: Safe.@n - * @e Shared @e objects: Unsafe. - * - * @par Example - * Performing an asynchronous wait: - * @code - * void handler( - * const boost::system::error_code& error, - * int signal_number) - * { - * if (!error) - * { - * // A signal occurred. - * } - * } - * - * ... - * - * // Construct a signal set registered for process termination. - * boost::asio::signal_set signals(io_context, SIGINT, SIGTERM); - * - * // Start an asynchronous wait for one of the signals to occur. - * signals.async_wait(handler); - * @endcode - * - * @par Queueing of signal notifications - * - * If a signal is registered with a signal_set, and the signal occurs when - * there are no waiting handlers, then the signal notification is queued. The - * next async_wait operation on that signal_set will dequeue the notification. - * If multiple notifications are queued, subsequent async_wait operations - * dequeue them one at a time. Signal notifications are dequeued in order of - * ascending signal number. - * - * If a signal number is removed from a signal_set (using the @c remove or @c - * erase member functions) then any queued notifications for that signal are - * discarded. - * - * @par Multiple registration of signals - * - * The same signal number may be registered with different signal_set objects. - * When the signal occurs, one handler is called for each signal_set object. - * - * Note that multiple registration only works for signals that are registered - * using Asio. The application must not also register a signal handler using - * functions such as @c signal() or @c sigaction(). - * - * @par Signal masking on POSIX platforms - * - * POSIX allows signals to be blocked using functions such as @c sigprocmask() - * and @c pthread_sigmask(). For signals to be delivered, programs must ensure - * that any signals registered using signal_set objects are unblocked in at - * least one thread. - */ -class signal_set - : BOOST_ASIO_SVC_ACCESS basic_io_object -{ -public: - /// The type of the executor associated with the object. - typedef io_context::executor_type executor_type; - - /// Construct a signal set without adding any signals. - /** - * This constructor creates a signal set without registering for any signals. - * - * @param io_context The io_context object that the signal set will use to - * dispatch handlers for any asynchronous operations performed on the set. - */ - explicit signal_set(boost::asio::io_context& io_context) - : basic_io_object(io_context) - { - } - - /// Construct a signal set and add one signal. - /** - * This constructor creates a signal set and registers for one signal. - * - * @param io_context The io_context object that the signal set will use to - * dispatch handlers for any asynchronous operations performed on the set. - * - * @param signal_number_1 The signal number to be added. - * - * @note This constructor is equivalent to performing: - * @code boost::asio::signal_set signals(io_context); - * signals.add(signal_number_1); @endcode - */ - signal_set(boost::asio::io_context& io_context, int signal_number_1) - : basic_io_object(io_context) - { - boost::system::error_code ec; - this->get_service().add(this->get_implementation(), signal_number_1, ec); - boost::asio::detail::throw_error(ec, "add"); - } - - /// Construct a signal set and add two signals. - /** - * This constructor creates a signal set and registers for two signals. - * - * @param io_context The io_context object that the signal set will use to - * dispatch handlers for any asynchronous operations performed on the set. - * - * @param signal_number_1 The first signal number to be added. - * - * @param signal_number_2 The second signal number to be added. - * - * @note This constructor is equivalent to performing: - * @code boost::asio::signal_set signals(io_context); - * signals.add(signal_number_1); - * signals.add(signal_number_2); @endcode - */ - signal_set(boost::asio::io_context& io_context, int signal_number_1, - int signal_number_2) - : basic_io_object(io_context) - { - boost::system::error_code ec; - this->get_service().add(this->get_implementation(), signal_number_1, ec); - boost::asio::detail::throw_error(ec, "add"); - this->get_service().add(this->get_implementation(), signal_number_2, ec); - boost::asio::detail::throw_error(ec, "add"); - } - - /// Construct a signal set and add three signals. - /** - * This constructor creates a signal set and registers for three signals. - * - * @param io_context The io_context object that the signal set will use to - * dispatch handlers for any asynchronous operations performed on the set. - * - * @param signal_number_1 The first signal number to be added. - * - * @param signal_number_2 The second signal number to be added. - * - * @param signal_number_3 The third signal number to be added. - * - * @note This constructor is equivalent to performing: - * @code boost::asio::signal_set signals(io_context); - * signals.add(signal_number_1); - * signals.add(signal_number_2); - * signals.add(signal_number_3); @endcode - */ - signal_set(boost::asio::io_context& io_context, int signal_number_1, - int signal_number_2, int signal_number_3) - : basic_io_object(io_context) - { - boost::system::error_code ec; - this->get_service().add(this->get_implementation(), signal_number_1, ec); - boost::asio::detail::throw_error(ec, "add"); - this->get_service().add(this->get_implementation(), signal_number_2, ec); - boost::asio::detail::throw_error(ec, "add"); - this->get_service().add(this->get_implementation(), signal_number_3, ec); - boost::asio::detail::throw_error(ec, "add"); - } - - /// Destroys the signal set. - /** - * This function destroys the signal set, cancelling any outstanding - * asynchronous wait operations associated with the signal set as if by - * calling @c cancel. - */ - ~signal_set() - { - } - -#if !defined(BOOST_ASIO_NO_DEPRECATED) - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - /** - * This function may be used to obtain the io_context object that the I/O - * object uses to dispatch handlers for asynchronous operations. - * - * @return A reference to the io_context object that the I/O object will use - * to dispatch handlers. Ownership is not transferred to the caller. - */ - boost::asio::io_context& get_io_context() - { - return basic_io_object::get_io_context(); - } - - /// (Deprecated: Use get_executor().) Get the io_context associated with the - /// object. - /** - * This function may be used to obtain the io_context object that the I/O - * object uses to dispatch handlers for asynchronous operations. - * - * @return A reference to the io_context object that the I/O object will use - * to dispatch handlers. Ownership is not transferred to the caller. - */ - boost::asio::io_context& get_io_service() - { - return basic_io_object::get_io_service(); - } -#endif // !defined(BOOST_ASIO_NO_DEPRECATED) - - /// Get the executor associated with the object. - executor_type get_executor() BOOST_ASIO_NOEXCEPT - { - return basic_io_object::get_executor(); - } - - /// Add a signal to a signal_set. - /** - * This function adds the specified signal to the set. It has no effect if the - * signal is already in the set. - * - * @param signal_number The signal to be added to the set. - * - * @throws boost::system::system_error Thrown on failure. - */ - void add(int signal_number) - { - boost::system::error_code ec; - this->get_service().add(this->get_implementation(), signal_number, ec); - boost::asio::detail::throw_error(ec, "add"); - } - - /// Add a signal to a signal_set. - /** - * This function adds the specified signal to the set. It has no effect if the - * signal is already in the set. - * - * @param signal_number The signal to be added to the set. - * - * @param ec Set to indicate what error occurred, if any. - */ - BOOST_ASIO_SYNC_OP_VOID add(int signal_number, - boost::system::error_code& ec) - { - this->get_service().add(this->get_implementation(), signal_number, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Remove a signal from a signal_set. - /** - * This function removes the specified signal from the set. It has no effect - * if the signal is not in the set. - * - * @param signal_number The signal to be removed from the set. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note Removes any notifications that have been queued for the specified - * signal number. - */ - void remove(int signal_number) - { - boost::system::error_code ec; - this->get_service().remove(this->get_implementation(), signal_number, ec); - boost::asio::detail::throw_error(ec, "remove"); - } - - /// Remove a signal from a signal_set. - /** - * This function removes the specified signal from the set. It has no effect - * if the signal is not in the set. - * - * @param signal_number The signal to be removed from the set. - * - * @param ec Set to indicate what error occurred, if any. - * - * @note Removes any notifications that have been queued for the specified - * signal number. - */ - BOOST_ASIO_SYNC_OP_VOID remove(int signal_number, - boost::system::error_code& ec) - { - this->get_service().remove(this->get_implementation(), signal_number, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Remove all signals from a signal_set. - /** - * This function removes all signals from the set. It has no effect if the set - * is already empty. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note Removes all queued notifications. - */ - void clear() - { - boost::system::error_code ec; - this->get_service().clear(this->get_implementation(), ec); - boost::asio::detail::throw_error(ec, "clear"); - } - - /// Remove all signals from a signal_set. - /** - * This function removes all signals from the set. It has no effect if the set - * is already empty. - * - * @param ec Set to indicate what error occurred, if any. - * - * @note Removes all queued notifications. - */ - BOOST_ASIO_SYNC_OP_VOID clear(boost::system::error_code& ec) - { - this->get_service().clear(this->get_implementation(), ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Cancel all operations associated with the signal set. - /** - * This function forces the completion of any pending asynchronous wait - * operations against the signal set. The handler for each cancelled - * operation will be invoked with the boost::asio::error::operation_aborted - * error code. - * - * Cancellation does not alter the set of registered signals. - * - * @throws boost::system::system_error Thrown on failure. - * - * @note If a registered signal occurred before cancel() is called, then the - * handlers for asynchronous wait operations will: - * - * @li have already been invoked; or - * - * @li have been queued for invocation in the near future. - * - * These handlers can no longer be cancelled, and therefore are passed an - * error code that indicates the successful completion of the wait operation. - */ - void cancel() - { - boost::system::error_code ec; - this->get_service().cancel(this->get_implementation(), ec); - boost::asio::detail::throw_error(ec, "cancel"); - } - - /// Cancel all operations associated with the signal set. - /** - * This function forces the completion of any pending asynchronous wait - * operations against the signal set. The handler for each cancelled - * operation will be invoked with the boost::asio::error::operation_aborted - * error code. - * - * Cancellation does not alter the set of registered signals. - * - * @param ec Set to indicate what error occurred, if any. - * - * @note If a registered signal occurred before cancel() is called, then the - * handlers for asynchronous wait operations will: - * - * @li have already been invoked; or - * - * @li have been queued for invocation in the near future. - * - * These handlers can no longer be cancelled, and therefore are passed an - * error code that indicates the successful completion of the wait operation. - */ - BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec) - { - this->get_service().cancel(this->get_implementation(), ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Start an asynchronous operation to wait for a signal to be delivered. - /** - * This function may be used to initiate an asynchronous wait against the - * signal set. It always returns immediately. - * - * For each call to async_wait(), the supplied handler will be called exactly - * once. The handler will be called when: - * - * @li One of the registered signals in the signal set occurs; or - * - * @li The signal set was cancelled, in which case the handler is passed the - * error code boost::asio::error::operation_aborted. - * - * @param handler The handler to be called when the signal occurs. Copies - * will be made of the handler as required. The function signature of the - * handler must be: - * @code void handler( - * const boost::system::error_code& error, // Result of operation. - * int signal_number // Indicates which signal occurred. - * ); @endcode - * Regardless of whether the asynchronous operation completes immediately or - * not, the handler will not be invoked from within this function. Invocation - * of the handler will be performed in a manner equivalent to using - * boost::asio::io_context::post(). - */ - template - BOOST_ASIO_INITFN_RESULT_TYPE(SignalHandler, - void (boost::system::error_code, int)) - async_wait(BOOST_ASIO_MOVE_ARG(SignalHandler) handler) - { - // If you get an error on the following line it means that your handler does - // not meet the documented type requirements for a SignalHandler. - BOOST_ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check; - - async_completion init(handler); - - this->get_service().async_wait(this->get_implementation(), - init.completion_handler); - - return init.result.get(); - } -}; -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -} // namespace asio -} // namespace boost - -#endif // BOOST_ASIO_SIGNAL_SET_HPP diff --git a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set_service.hpp b/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set_service.hpp deleted file mode 100644 index 705b32cc..00000000 --- a/NewDomApProj/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1/BH/include/boost/asio/signal_set_service.hpp +++ /dev/null @@ -1,144 +0,0 @@ -// -// signal_set_service.hpp -// ~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2017 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) -// - -#ifndef BOOST_ASIO_SIGNAL_SET_SERVICE_HPP -#define BOOST_ASIO_SIGNAL_SET_SERVICE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#include -#include -#include -#include - -#include - -namespace boost { -namespace asio { - -/// Default service implementation for a signal set. -class signal_set_service -#if defined(GENERATING_DOCUMENTATION) - : public boost::asio::io_context::service -#else - : public boost::asio::detail::service_base -#endif -{ -public: -#if defined(GENERATING_DOCUMENTATION) - /// The unique service identifier. - static boost::asio::io_context::id id; -#endif - -public: - /// The type of a signal set implementation. -#if defined(GENERATING_DOCUMENTATION) - typedef implementation_defined implementation_type; -#else - typedef detail::signal_set_service::implementation_type implementation_type; -#endif - - /// Construct a new signal set service for the specified io_context. - explicit signal_set_service(boost::asio::io_context& io_context) - : boost::asio::detail::service_base(io_context), - service_impl_(io_context) - { - } - - /// Construct a new signal set implementation. - void construct(implementation_type& impl) - { - service_impl_.construct(impl); - } - - /// Destroy a signal set implementation. - void destroy(implementation_type& impl) - { - service_impl_.destroy(impl); - } - - /// Add a signal to a signal_set. - BOOST_ASIO_SYNC_OP_VOID add(implementation_type& impl, - int signal_number, boost::system::error_code& ec) - { - service_impl_.add(impl, signal_number, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Remove a signal to a signal_set. - BOOST_ASIO_SYNC_OP_VOID remove(implementation_type& impl, - int signal_number, boost::system::error_code& ec) - { - service_impl_.remove(impl, signal_number, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Remove all signals from a signal_set. - BOOST_ASIO_SYNC_OP_VOID clear(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.clear(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - /// Cancel all operations associated with the signal set. - BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl, - boost::system::error_code& ec) - { - service_impl_.cancel(impl, ec); - BOOST_ASIO_SYNC_OP_VOID_RETURN(ec); - } - - // Start an asynchronous operation to wait for a signal to be delivered. - template - BOOST_ASIO_INITFN_RESULT_TYPE(SignalHandler, - void (boost::system::error_code, int)) - async_wait(implementation_type& impl, - BOOST_ASIO_MOVE_ARG(SignalHandler) handler) - { - async_completion init(handler); - - service_impl_.async_wait(impl, init.completion_handler); - - return init.result.get(); - } - -private: - // Destroy all user-defined handler objects owned by the service. - void shutdown() - { - service_impl_.shutdown(); - } - - // Perform any fork-related housekeeping. - void notify_fork(boost::asio::io_context::fork_event event) - { - service_impl_.notify_fork(event); - } - - // The platform-specific implementation. - detail::signal_set_service service_impl_; -}; - -} // namespace asio -} // namespace boost - -#include - -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - -#endif // BOOST_ASIO_SIGNAL_SET_SERVICE_HPP