Realistic 3D camera system
3D camera system components
read_op.hpp
Go to the documentation of this file.
1 //
2 // ssl/detail/read_op.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef ASIO_SSL_DETAIL_READ_OP_HPP
12 #define ASIO_SSL_DETAIL_READ_OP_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 
20 #if !defined(ASIO_ENABLE_OLD_SSL)
23 #endif // !defined(ASIO_ENABLE_OLD_SSL)
24 
26 
27 namespace asio {
28 namespace ssl {
29 namespace detail {
30 
31 #if !defined(ASIO_ENABLE_OLD_SSL)
32 
33 template <typename MutableBufferSequence>
34 class read_op
35 {
36 public:
37  read_op(const MutableBufferSequence& buffers)
38  : buffers_(buffers)
39  {
40  }
41 
43  asio::error_code& ec,
44  std::size_t& bytes_transferred) const
45  {
48  MutableBufferSequence>::first(buffers_);
49 
50  return eng.read(buffer, ec, bytes_transferred);
51  }
52 
53  template <typename Handler>
54  void call_handler(Handler& handler,
55  const asio::error_code& ec,
56  const std::size_t& bytes_transferred) const
57  {
58  handler(ec, bytes_transferred);
59  }
60 
61 private:
62  MutableBufferSequence buffers_;
63 };
64 
65 #endif // !defined(ASIO_ENABLE_OLD_SSL)
66 
67 } // namespace detail
68 } // namespace ssl
69 } // namespace asio
70 
72 
73 #endif // ASIO_SSL_DETAIL_READ_OP_HPP
ASIO_DECL want read(const asio::mutable_buffer &data, asio::error_code &ec, std::size_t &bytes_transferred)
Definition: engine.ipp:159
mutable_buffers_1 buffer(const mutable_buffer &b)
Create a new modifiable buffer from an existing buffer.
Definition: buffer.hpp:706
read_op(const MutableBufferSequence &buffers)
Definition: read_op.hpp:37
const MutableBufferSequence & buffers
Definition: read.hpp:521
void call_handler(Handler &handler, const asio::error_code &ec, const std::size_t &bytes_transferred) const
Definition: read_op.hpp:54
Holds a buffer that can be modified.
Definition: buffer.hpp:91
Class to represent an error code value.
Definition: error_code.hpp:80
engine::want operator()(engine &eng, asio::error_code &ec, std::size_t &bytes_transferred) const
Definition: read_op.hpp:42