Boost.AFIO    Boost C++ Libraries
Functions
Reading data

Functions

template<class T >
virtual std::vector< future<> > boost::afio::dispatcher::read (const std::vector< io_req< T >> &ops)=0
 Schedule a batch of asynchronous data reads after preceding operations, where offset and total data read must not exceed the present file size.
template<class T >
future boost::afio::async_read (future<> _precondition, T &&v, off_t _where)
 Asynchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
future boost::afio::async_read (future<> _precondition, T &&v, size_t _length, off_t _where)
 Asynchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (future<> _precondition, T &&v, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (future<> _precondition, T &&v, size_t _length, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (error_code &_ec, future<> _precondition, T &&v, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (error_code &_ec, future<> _precondition, T &&v, size_t _length, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.

Function Documentation

template<class T >
std::vector< future<> > boost::afio::dispatcher::read ( const std::vector< io_req< T >> &  ops) [pure virtual]

Schedule a batch of asynchronous data reads after preceding operations, where offset and total data read must not exceed the present file size.

Related types: `__afio_io_req__` Note that on Windows this call issues a separate async file operation for each buffer supplied, thus making scatter/gather i/o no more efficient than making separate calls. The big exception to this is when doing unbuffered page aligned i/o for which Windows provides special scatter/gather i/o functions. You should therefore assume that only each buffer is atomically read or written rather than the full sequence of buffers at once (this also applies to POSIX systems without the preadv()/pwritev() operations).

Returns:
A batch of op handles.
Template Parameters:
class TAny type.
Parameters:
opsA batch of io_req<T> structures.

Definition at line 3698 of file afio.hpp.

template<class T >
future boost::afio::async_read ( future<>  _precondition,
T &&  v,
off_t  _where 
)

Asynchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.

Template Parameters:
class TAny type.
Returns:
A future<void>
Parameters:
_preconditionThe precondition to use.
vSome item understood by `to_asio_buffers()`
_whereThe file offset to do the i/o

{distinguish, length deducing} {Amortised O(1) to dispatch. Amortised O(1) to complete if reading data is constant time.} {readwrite_example}

Definition at line 5028 of file afio.hpp.

template<class T >
future boost::afio::async_read ( future<>  _precondition,
T &&  v,
size_t  _length,
off_t  _where 
)

Asynchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.

Template Parameters:
class TAny type.
Returns:
A future<void>
Parameters:
_preconditionThe precondition to use.
vSome item understood by `to_asio_buffers()`
_lengthThe length of the item
_whereThe file offset to do the i/o

{distinguish, length specifying} {Amortised O(1) to dispatch. Amortised O(1) to complete if reading data is constant time.} {readwrite_example}

Definition at line 5049 of file afio.hpp.

template<class T >
void boost::afio::read ( future<>  _precondition,
T &&  v,
off_t  _where 
)

Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.

Template Parameters:
class TAny type.
Parameters:
_preconditionThe precondition to use.
vSome item understood by `to_asio_buffers()`
_whereThe file offset to do the i/o

{distinguish, length deducing throwing} {Amortised O(1) to dispatch. Amortised O(1) to complete if reading data is constant time.} {readwrite_example}

Definition at line 5068 of file afio.hpp.

template<class T >
void boost::afio::read ( future<>  _precondition,
T &&  v,
size_t  _length,
off_t  _where 
)

Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.

Template Parameters:
class TAny type.
Parameters:
_preconditionThe precondition to use.
vSome item understood by `to_asio_buffers()`
_lengthThe length of the item
_whereThe file offset to do the i/o

{distinguish, length specifying throwing} {Amortised O(1) to dispatch. Amortised O(1) to complete if reading data is constant time.} {readwrite_example}

Definition at line 5088 of file afio.hpp.

template<class T >
void boost::afio::read ( error_code &  _ec,
future<>  _precondition,
T &&  v,
off_t  _where 
)

Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.

Template Parameters:
class TAny type.
Parameters:
_ecError code to set.
_preconditionThe precondition to use.
vSome item understood by `to_asio_buffers()`
_whereThe file offset to do the i/o

{distinguish, length deducing non throwing} {Amortised O(1) to dispatch. Amortised O(1) to complete if reading data is constant time.} {readwrite_example}

Definition at line 5108 of file afio.hpp.

template<class T >
void boost::afio::read ( error_code &  _ec,
future<>  _precondition,
T &&  v,
size_t  _length,
off_t  _where 
)

Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.

Template Parameters:
class TAny type.
Parameters:
_ecError code to set.
_preconditionThe precondition to use.
vSome item understood by `to_asio_buffers()`
_lengthThe length of the item
_whereThe file offset to do the i/o

{distinguish, length specifying non throwing} {Amortised O(1) to dispatch. Amortised O(1) to complete if reading data is constant time.} {readwrite_example}

Definition at line 5129 of file afio.hpp.


January, 2014

Copyright © 2013-2014 Niall Douglas, Cork, Ireland
Copyright © 2013 Paul Kirth, California
Documentation is generated by Doxygen