Source wrapper that limits the number of bytes read through it and returns EOF on threshold exceed. More...
#include <staticlib/io/limited_source.hpp>
Public Member Functions | |
| limited_source (Source &&src, size_t limit_bytes) | |
| Constructor, created source wrapper will own specified source. | |
| limited_source (const limited_source &) | |
| Deleted copy constructor. | |
| limited_source & | operator= (const limited_source &) |
| Deleted copy assignment operator. | |
| limited_source (limited_source &&other) STATICLIB_NOEXCEPT | |
| Move constructor. | |
| limited_source & | operator= (limited_source &&other) STATICLIB_NOEXCEPT |
| Move assignment operator. | |
| std::streamsize | read (span< char > origin_span) |
| Counting read implementation. | |
| size_t | get_count () |
| Returns number of bytes read through this instance. | |
| Source & | get_source () |
| Underlying source accessor. | |
Source wrapper that limits the number of bytes read through it and returns EOF on threshold exceed.
|
inline |
Constructor, created source wrapper will own specified source.
| src | input source |
| limit_bytes | max number of bytes allowed to be read from this source |
| staticlib::io::limited_source< Source >::limited_source | ( | const limited_source< Source > & | ) |
Deleted copy constructor.
| other | instance |
|
inline |
Move constructor.
| other | other instance |
|
inline |
Returns number of bytes read through this instance.
|
inline |
Underlying source accessor.
| limited_source& staticlib::io::limited_source< Source >::operator= | ( | const limited_source< Source > & | ) |
Deleted copy assignment operator.
| other | instance |
|
inline |
Move assignment operator.
| other | other instance |
|
inline |
Counting read implementation.
| span | buffer span |
1.8.1.2