Realistic 3D camera system
3D camera system components
|
Adds buffering to the read-related operations of a stream. More...
#include <buffered_read_stream.hpp>
Public Types | |
typedef remove_reference< Stream >::type | next_layer_type |
The type of the next layer. More... | |
typedef next_layer_type::lowest_layer_type | lowest_layer_type |
The type of the lowest layer. More... | |
Public Member Functions | |
ASIO_STATIC_CONSTANT (std::size_t, default_buffer_size=1024) | |
template<typename Arg > | |
buffered_read_stream (Arg &a) | |
Construct, passing the specified argument to initialise the next layer. More... | |
template<typename Arg > | |
buffered_read_stream (Arg &a, std::size_t buffer_size) | |
Construct, passing the specified argument to initialise the next layer. More... | |
next_layer_type & | next_layer () |
Get a reference to the next layer. More... | |
lowest_layer_type & | lowest_layer () |
Get a reference to the lowest layer. More... | |
const lowest_layer_type & | lowest_layer () const |
Get a const reference to the lowest layer. More... | |
asio::io_service & | get_io_service () |
Get the io_service associated with the object. More... | |
void | close () |
Close the stream. More... | |
asio::error_code | close (asio::error_code &ec) |
Close the stream. More... | |
template<typename ConstBufferSequence > | |
std::size_t | write_some (const ConstBufferSequence &buffers) |
template<typename ConstBufferSequence > | |
std::size_t | write_some (const ConstBufferSequence &buffers, asio::error_code &ec) |
template<typename ConstBufferSequence , typename WriteHandler > | |
ASIO_INITFN_RESULT_TYPE (WriteHandler, void(asio::error_code, std::size_t)) async_write_some(const ConstBufferSequence &buffers | |
ASIO_MOVE_ARG (WriteHandler) handler) | |
std::size_t | fill () |
std::size_t | fill (asio::error_code &ec) |
template<typename ReadHandler > | |
ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_fill(ASIO_MOVE_ARG(ReadHandler) handler) | |
Start an asynchronous fill. More... | |
template<typename MutableBufferSequence > | |
std::size_t | read_some (const MutableBufferSequence &buffers) |
template<typename MutableBufferSequence > | |
std::size_t | read_some (const MutableBufferSequence &buffers, asio::error_code &ec) |
template<typename MutableBufferSequence , typename ReadHandler > | |
ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_read_some(const MutableBufferSequence &buffers | |
ASIO_MOVE_ARG (ReadHandler) handler) | |
template<typename MutableBufferSequence > | |
std::size_t | peek (const MutableBufferSequence &buffers) |
template<typename MutableBufferSequence > | |
std::size_t | peek (const MutableBufferSequence &buffers, asio::error_code &ec) |
std::size_t | in_avail () |
Determine the amount of data that may be read without blocking. More... | |
std::size_t | in_avail (asio::error_code &ec) |
Determine the amount of data that may be read without blocking. More... | |
Adds buffering to the read-related operations of a stream.
The buffered_read_stream class template can be used to add buffering to the synchronous and asynchronous read operations of a stream.
Definition at line 48 of file buffered_read_stream.hpp.
typedef next_layer_type::lowest_layer_type asio::buffered_read_stream< Stream >::lowest_layer_type |
The type of the lowest layer.
Definition at line 56 of file buffered_read_stream.hpp.
typedef remove_reference<Stream>::type asio::buffered_read_stream< Stream >::next_layer_type |
The type of the next layer.
Definition at line 53 of file buffered_read_stream.hpp.
|
inlineexplicit |
Construct, passing the specified argument to initialise the next layer.
Definition at line 67 of file buffered_read_stream.hpp.
|
inline |
Construct, passing the specified argument to initialise the next layer.
Definition at line 75 of file buffered_read_stream.hpp.
asio::buffered_read_stream< Stream >::ASIO_INITFN_RESULT_TYPE | ( | WriteHandler | , |
void(asio::error_code, std::size_t) | |||
) | const |
Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
asio::buffered_read_stream< Stream >::ASIO_INITFN_RESULT_TYPE | ( | ReadHandler | , |
void(asio::error_code, std::size_t) | |||
) |
Start an asynchronous fill.
asio::buffered_read_stream< Stream >::ASIO_INITFN_RESULT_TYPE | ( | ReadHandler | , |
void(asio::error_code, std::size_t) | |||
) | const |
Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
|
inline |
Definition at line 140 of file buffered_read_stream.hpp.
asio::buffered_read_stream< Stream >::ASIO_MOVE_ARG | ( | ReadHandler | ) |
asio::buffered_read_stream< Stream >::ASIO_STATIC_CONSTANT | ( | std::size_t | , |
default_buffer_size | = 1024 |
||
) |
|
inline |
Close the stream.
Definition at line 106 of file buffered_read_stream.hpp.
|
inline |
Close the stream.
Definition at line 112 of file buffered_read_stream.hpp.
std::size_t asio::buffered_read_stream< Stream >::fill | ( | ) |
Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
Definition at line 28 of file buffered_read_stream.hpp.
std::size_t asio::buffered_read_stream< Stream >::fill | ( | asio::error_code & | ec | ) |
Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
Definition at line 42 of file buffered_read_stream.hpp.
|
inline |
Get the io_service associated with the object.
Definition at line 100 of file buffered_read_stream.hpp.
|
inline |
Determine the amount of data that may be read without blocking.
Definition at line 198 of file buffered_read_stream.hpp.
|
inline |
Determine the amount of data that may be read without blocking.
Definition at line 204 of file buffered_read_stream.hpp.
|
inline |
Get a reference to the lowest layer.
Definition at line 88 of file buffered_read_stream.hpp.
|
inline |
Get a const reference to the lowest layer.
Definition at line 94 of file buffered_read_stream.hpp.
|
inline |
Get a reference to the next layer.
Definition at line 82 of file buffered_read_stream.hpp.
std::size_t asio::buffered_read_stream< Stream >::peek | ( | const MutableBufferSequence & | buffers | ) |
Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
Definition at line 335 of file buffered_read_stream.hpp.
std::size_t asio::buffered_read_stream< Stream >::peek | ( | const MutableBufferSequence & | buffers, |
asio::error_code & | ec | ||
) |
Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
Definition at line 345 of file buffered_read_stream.hpp.
std::size_t asio::buffered_read_stream< Stream >::read_some | ( | const MutableBufferSequence & | buffers | ) |
Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
Definition at line 170 of file buffered_read_stream.hpp.
std::size_t asio::buffered_read_stream< Stream >::read_some | ( | const MutableBufferSequence & | buffers, |
asio::error_code & | ec | ||
) |
Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
Definition at line 184 of file buffered_read_stream.hpp.
|
inline |
Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
Definition at line 120 of file buffered_read_stream.hpp.
|
inline |
Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
Definition at line 128 of file buffered_read_stream.hpp.