boost::buffers::any_source
A type erased source.
Synopsis
Declared in <boost/buffers/any_source.hpp>
class any_source;
Description
An object of this type represents shared ownership of a type‐erased read source or data source. It provides a uniform interface for reading the source data regardless of how the source is implemented. Accessing the bytes is achieved by calling read which reads data into a caller‐provided buffer. Alternatively, when has_buffers returns true the source consists of buffers in memory, and they can be accessed directly by calling get_buffers.
Example sources include: ‐ in‐memory buffers ‐ streaming file data ‐ generated data
|
|
Type‐erased sources can always be rewound to the beginning by calling rewind. Therefore, a source can be read multiple times.
Member Functions
Name |
Description |
|
Constructors |
Assignment |
|
Return the buffers representing the source, if available. |
|
Return |
|
Return |
|
Read from the source into a caller‐provided buffer. |
|
Rewind the source to the beginning. This allows the source to be accessed from the start when calling . |
|
Return the size of the source, if available. |
Created with MrDocs