Realistic 3D camera system
3D camera system components
|
Start an asynchronous operation to read a certain amount of data from a stream. More...
Functions | |
template<typename AsyncReadStream , typename MutableBufferSequence , typename ReadHandler > | |
asio::ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_read(AsyncReadStream &s | |
const MutableBufferSequence CompletionCondition | asio::ASIO_MOVE_ARG (ReadHandler) handler) |
template<typename AsyncReadStream , typename MutableBufferSequence , typename CompletionCondition , typename ReadHandler > | |
asio::ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_read(AsyncReadStream &s | |
Variables | |
const MutableBufferSequence & | asio::buffers |
const MutableBufferSequence CompletionCondition | asio::completion_condition |
asio::basic_streambuf< Allocator > & | asio::b |
asio::basic_streambuf< Allocator > CompletionCondition | asio::ASIO_MOVE_ARG (ReadHandler) handler) |
Start an asynchronous operation to read a certain amount of data from a stream.
|
inline |
Start an asynchronous operation to read a certain amount of data from a stream. This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
s | The stream from which the data is to be read. The type must support the AsyncReadStream concept. |
buffers | One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. |
completion_condition | The function object to be called to determine whether the read operation is complete. The signature of the function object must be: std::size_t completion_condition( // Result of latest async_read_some operation. const asio::error_code& error, // Number of bytes transferred so far. std::size_t bytes_transferred ); |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( std::size_t bytes_transferred // Number of bytes copied into the // buffers. If an error occurred, // this will be the number of // bytes successfully transferred // prior to the error. ); |
Start an asynchronous operation to read a certain amount of data from a stream. This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. The program must ensure that the stream performs no other read operations (such as async_read, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
s | The stream from which the data is to be read. The type must support the AsyncReadStream concept. |
b | A basic_streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called. |
completion_condition | The function object to be called to determine whether the read operation is complete. The signature of the function object must be: std::size_t completion_condition( // Result of latest async_read_some operation. const asio::error_code& error, // Number of bytes transferred so far. std::size_t bytes_transferred ); |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( std::size_t bytes_transferred // Number of bytes copied into the // buffers. If an error occurred, // this will be the number of // bytes successfully transferred // prior to the error. ); |
Start an asynchronous operation to read a certain amount of data at the specified offset. This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
d | The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept. |
offset | The offset at which the data will be read. |
buffers | One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. |
completion_condition | The function object to be called to determine whether the read operation is complete. The signature of the function object must be: std::size_t completion_condition( // Result of latest async_read_some_at operation. const asio::error_code& error, // Number of bytes transferred so far. std::size_t bytes_transferred ); |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( // Result of operation. const asio::error_code& error, // Number of bytes copied into the buffers. If an error // occurred, this will be the number of bytes successfully // transferred prior to the error. std::size_t bytes_transferred ); |
Start an asynchronous operation to read a certain amount of data at the specified offset. This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the device's async_read_some_at function.
d | The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept. |
offset | The offset at which the data will be read. |
b | A basic_streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called. |
completion_condition | The function object to be called to determine whether the read operation is complete. The signature of the function object must be: std::size_t completion_condition( // Result of latest async_read_some_at operation. const asio::error_code& error, // Number of bytes transferred so far. std::size_t bytes_transferred ); |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( // Result of operation. const asio::error_code& error, // Number of bytes copied into the buffers. If an error // occurred, this will be the number of bytes successfully // transferred prior to the error. std::size_t bytes_transferred ); |
Start an asynchronous operation to read data into a streambuf until a function object indicates a match. This function is used to asynchronously read data into the specified streambuf until a user-defined match condition function object, when applied to the data contained in the streambuf, indicates a successful match. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. If the match condition function object already indicates a match, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async_read, async_read_until, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
s | The stream from which the data is to be read. The type must support the AsyncReadStream concept. |
b | A streambuf object into which the data will be read. |
match_condition | The function object to be called to determine whether a match exists. The signature of the function object must be: where iterator represents the type: buffers_iterator<basic_streambuf<Allocator>::const_buffers_type> begin and end define the range of bytes to be scanned to determine whether there is a match. The first member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the begin parameter for any subsequent invocation of the match condition. The second member of the return value is true if a match has been found, false otherwise. |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( // Result of operation. const asio::error_code& error, // The number of bytes in the streambuf's get // area that have been fully consumed by the // match function. O if an error occurred. std::size_t bytes_transferred ); |
is_match_condition
type trait evaluates to true for function pointers and function objects with a result_type
typedef. It must be specialised for other user-defined function objects.To asynchronously read data into a streambuf until a matching character is found:
|
inline |
Start an asynchronous operation to read a certain amount of data from a stream. This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. The program must ensure that the stream performs no other read operations (such as async_read, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
s | The stream from which the data is to be read. The type must support the AsyncReadStream concept. |
buffers | One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( std::size_t bytes_transferred // Number of bytes copied into the // buffers. If an error occurred, // this will be the number of // bytes successfully transferred // prior to the error. ); |
Start an asynchronous operation to read a certain amount of data from a stream. This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. The program must ensure that the stream performs no other read operations (such as async_read, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
s | The stream from which the data is to be read. The type must support the AsyncReadStream concept. |
b | A basic_streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called. |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( std::size_t bytes_transferred // Number of bytes copied into the // buffers. If an error occurred, // this will be the number of // bytes successfully transferred // prior to the error. ); |
Start an asynchronous operation to read a certain amount of data at the specified offset. This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the device's async_read_some_at function.
d | The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept. |
offset | The offset at which the data will be read. |
buffers | One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( // Result of operation. const asio::error_code& error, // Number of bytes copied into the buffers. If an error // occurred, this will be the number of bytes successfully // transferred prior to the error. std::size_t bytes_transferred ); |
Start an asynchronous operation to read a certain amount of data at the specified offset. This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the device's async_read_some_at function.
d | The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept. |
offset | The offset at which the data will be read. |
b | A basic_streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called. |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( // Result of operation. const asio::error_code& error, // Number of bytes copied into the buffers. If an error // occurred, this will be the number of bytes successfully // transferred prior to the error. std::size_t bytes_transferred ); |
Start an asynchronous operation to read data into a streambuf until it contains a specified delimiter. This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async_read, async_read_until, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
s | The stream from which the data is to be read. The type must support the AsyncReadStream concept. |
b | A streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called. |
delim | The delimiter character. |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( // Result of operation. const asio::error_code& error, // The number of bytes in the streambuf's get // area up to and including the delimiter. // 0 if an error occurred. std::size_t bytes_transferred ); |
async_read_until
operation completes successfully, the buffer b
contains the delimiter: std::getline
then extracts the data up to and including the delimiter, so that the string line
contains: b
as follows: async_read_until
operation.Start an asynchronous operation to read data into a streambuf until it contains a specified delimiter. This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async_read, async_read_until, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
s | The stream from which the data is to be read. The type must support the AsyncReadStream concept. |
b | A streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called. |
delim | The delimiter string. |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( // Result of operation. const asio::error_code& error, // The number of bytes in the streambuf's get // area up to and including the delimiter. // 0 if an error occurred. std::size_t bytes_transferred ); |
async_read_until
operation completes successfully, the buffer b
contains the delimiter: std::getline
then extracts the data up to and including the delimiter, so that the string line
contains: b
as follows: async_read_until
operation. const MutableBufferSequence CompletionCondition asio::ASIO_MOVE_ARG | ( | ReadHandler | ) |
uint64_t basic_streambuf< Allocator > CompletionCondition asio::ASIO_MOVE_ARG | ( | ReadHandler | ) |