ESP32  1.0.4
asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler > クラステンプレート

#include <read_at.hpp>

asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler > の継承関係図
asio::detail::base_from_completion_cond< CompletionCondition >

公開メンバ関数

 read_at_streambuf_op (AsyncRandomAccessReadDevice &device, uint64_t offset, basic_streambuf< Allocator > &streambuf, CompletionCondition completion_condition, ReadHandler &handler)
 
void operator() (const asio::error_code &ec, std::size_t bytes_transferred, int start=0)
 

公開変数類

AsyncRandomAccessReadDevice & device_
 
uint64_t offset_
 
asio::basic_streambuf< Allocator > & streambuf_
 
int start_
 
std::size_t total_transferred_
 
ReadHandler handler_
 

詳解

template<typename AsyncRandomAccessReadDevice, typename Allocator, typename CompletionCondition, typename ReadHandler>
class asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >

read_at.hpp414 行目に定義があります。

構築子と解体子

◆ read_at_streambuf_op()

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::read_at_streambuf_op ( AsyncRandomAccessReadDevice &  device,
uint64_t  offset,
basic_streambuf< Allocator > &  streambuf,
CompletionCondition  completion_condition,
ReadHandler &  handler 
)
inline

read_at.hpp418 行目に定義があります。

421  : detail::base_from_completion_cond<
422  CompletionCondition>(completion_condition),
423  device_(device),
424  offset_(offset),
426  start_(0),
428  handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
429  {
430  }
basic_streambuf streambuf
Typedef for the typical usage of basic_streambuf.
Definition: streambuf.hpp:27
AsyncRandomAccessReadDevice & device_
Definition: read_at.hpp:484
uint64_t offset
Definition: read_at.hpp:367
const MutableBufferSequence CompletionCondition completion_condition
Definition: read.hpp:412
#define ASIO_MOVE_CAST(type)
Definition: config.hpp:152
asio::basic_streambuf< Allocator > & streambuf_
Definition: read_at.hpp:486

関数詳解

◆ operator()()

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
void asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::operator() ( const asio::error_code ec,
std::size_t  bytes_transferred,
int  start = 0 
)
inline

read_at.hpp456 行目に定義があります。

458  {
459  std::size_t max_size, bytes_available;
460  switch (start_ = start)
461  {
462  case 1:
463  max_size = this->check_for_completion(ec, total_transferred_);
464  bytes_available = read_size_helper(streambuf_, max_size);
465  for (;;)
466  {
467  device_.async_read_some_at(offset_ + total_transferred_,
468  streambuf_.prepare(bytes_available),
470  return; default:
471  total_transferred_ += bytes_transferred;
472  streambuf_.commit(bytes_transferred);
473  max_size = this->check_for_completion(ec, total_transferred_);
474  bytes_available = read_size_helper(streambuf_, max_size);
475  if ((!ec && bytes_transferred == 0) || bytes_available == 0)
476  break;
477  }
478 
479  handler_(ec, static_cast<const std::size_t&>(total_transferred_));
480  }
481  }
read_at_streambuf_op(AsyncRandomAccessReadDevice &device, uint64_t offset, basic_streambuf< Allocator > &streambuf, CompletionCondition completion_condition, ReadHandler &handler)
Definition: read_at.hpp:418
std::size_t check_for_completion(const asio::error_code &ec, std::size_t total_transferred)
AsyncRandomAccessReadDevice & device_
Definition: read_at.hpp:484
#define ASIO_MOVE_CAST(type)
Definition: config.hpp:152
asio::basic_streambuf< Allocator > & streambuf_
Definition: read_at.hpp:486

メンバ詳解

◆ device_

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
AsyncRandomAccessReadDevice& asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::device_

read_at.hpp484 行目に定義があります。

◆ handler_

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
ReadHandler asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::handler_

read_at.hpp489 行目に定義があります。

◆ offset_

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
uint64_t asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::offset_

read_at.hpp485 行目に定義があります。

◆ start_

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
int asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::start_

read_at.hpp487 行目に定義があります。

◆ streambuf_

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
asio::basic_streambuf<Allocator>& asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::streambuf_

read_at.hpp486 行目に定義があります。

◆ total_transferred_

template<typename AsyncRandomAccessReadDevice , typename Allocator , typename CompletionCondition , typename ReadHandler >
std::size_t asio::detail::read_at_streambuf_op< AsyncRandomAccessReadDevice, Allocator, CompletionCondition, ReadHandler >::total_transferred_

read_at.hpp488 行目に定義があります。


このクラス詳解は次のファイルから抽出されました: