summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/read_until.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/read_until.hpp49
1 files changed, 34 insertions, 15 deletions
diff --git a/3rdParty/Boost/src/boost/asio/read_until.hpp b/3rdParty/Boost/src/boost/asio/read_until.hpp
index 1f1bddb..a351604 100644
--- a/3rdParty/Boost/src/boost/asio/read_until.hpp
+++ b/3rdParty/Boost/src/boost/asio/read_until.hpp
@@ -1,11 +1,11 @@
//
// read_until.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 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
@@ -14,22 +14,20 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
#include <cstddef>
-#include <boost/type_traits/is_function.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/detail/workaround.hpp>
#include <string>
+#include <boost/asio/async_result.hpp>
#include <boost/asio/basic_streambuf.hpp>
#include <boost/asio/detail/regex_fwd.hpp>
+#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
@@ -56,13 +54,14 @@ 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::is_function<typename boost::remove_pointer<T>::type>::value
+ value = boost::asio::is_function<
+ typename boost::asio::remove_pointer<T>::type>::value
|| detail::has_result_type<T>::value
};
#endif
};
/**
@@ -244,12 +243,15 @@ std::size_t read_until(SyncReadStream& s,
*/
template <typename SyncReadStream, typename Allocator>
std::size_t read_until(SyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b, const std::string& 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:
@@ -336,12 +338,15 @@ std::size_t read_until(SyncReadStream& s,
*/
template <typename SyncReadStream, typename Allocator>
std::size_t read_until(SyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& 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:
@@ -438,13 +443,13 @@ std::size_t read_until(SyncReadStream& s,
* boost::asio::read_until(s, b, match_char('a'));
* @endcode
*/
template <typename SyncReadStream, typename Allocator, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
- typename boost::enable_if<is_match_condition<MatchCondition> >::type* = 0);
+ typename enable_if<is_match_condition<MatchCondition>::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
@@ -494,13 +499,13 @@ std::size_t read_until(SyncReadStream& s,
* function objects.
*/
template <typename SyncReadStream, typename Allocator, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b,
MatchCondition match_condition, boost::system::error_code& ec,
- typename boost::enable_if<is_match_condition<MatchCondition> >::type* = 0);
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
/*@}*/
/**
* @defgroup async_read_until boost::asio::async_read_until
*
* @brief Start an asynchronous operation to read data into a streambuf until it
@@ -585,13 +590,15 @@ std::size_t read_until(SyncReadStream& s,
* 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 <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-void async_read_until(AsyncReadStream& s,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& 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.
/**
@@ -668,16 +675,21 @@ void async_read_until(AsyncReadStream& s,
* 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 <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-void async_read_until(AsyncReadStream& s,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b, const std::string& 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
@@ -755,16 +767,21 @@ void async_read_until(AsyncReadStream& s,
* 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 <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-void async_read_until(AsyncReadStream& s,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& 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
@@ -884,23 +901,25 @@ void async_read_until(AsyncReadStream& s,
* boost::asio::streambuf b;
* boost::asio::async_read_until(s, b, match_char('a'), handler);
* @endcode
*/
template <typename AsyncReadStream, typename Allocator,
typename MatchCondition, typename ReadHandler>
-void async_read_until(AsyncReadStream& s,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b,
MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename boost::enable_if<is_match_condition<MatchCondition> >::type* = 0);
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
/*@}*/
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
#include <boost/asio/impl/read_until.hpp>
-#endif // !defined(BOOST_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // BOOST_ASIO_READ_UNTIL_HPP