Boost.AFIO    Boost C++ Libraries
Functions
Writing data

Functions

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

Function Documentation

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

Schedule a batch of asynchronous data writes after preceding operations, where offset and total data written 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<const T> structures.
template<class T >
future boost::afio::async_write ( future<>  _precondition,
T &&  v,
off_t  _where 
)

Asynchronous data write after a preceding operation, where offset and total data written 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 writing data is constant time.} {readwrite_example}

Definition at line 5151 of file afio.hpp.

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

Asynchronous data write after a preceding operation, where offset and total data written 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 writing data is constant time.} {readwrite_example}

Definition at line 5172 of file afio.hpp.

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

Synchronous data write after a preceding operation, where offset and total data written 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 writing data is constant time.} {readwrite_example}

Definition at line 5191 of file afio.hpp.

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

Synchronous data write after a preceding operation, where offset and total data written 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 writing data is constant time.} {readwrite_example}

Definition at line 5211 of file afio.hpp.

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

Synchronous data write after a preceding operation, where offset and total data written 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 writing data is constant time.} {readwrite_example}

Definition at line 5231 of file afio.hpp.

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

Synchronous data write after a preceding operation, where offset and total data written 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 writing data is constant time.} {readwrite_example}

Definition at line 5252 of file afio.hpp.


January, 2014

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