Source wrapper that buffers the input. More...
#include <staticlib/io/buffered_source.hpp>
Public Member Functions | |
| buffered_source (Source &&src) | |
| Constructor, created source wrapper will own specified source. | |
| buffered_source (const buffered_source &) | |
| Deleted copy constructor. | |
| buffered_source & | operator= (const buffered_source &) |
| Deleted copy assignment operator. | |
| buffered_source (buffered_source &&other) STATICLIB_NOEXCEPT | |
| Move constructor. | |
| buffered_source & | operator= (buffered_source &&other) STATICLIB_NOEXCEPT |
| Move assignment operator. | |
| std::streamsize | read (span< char > span) |
| Buffered read implementation. | |
| std::string | read_line (const std::string &ending="\n", size_t max_length=(1<< 16)) |
| Reads underlying source until specified line ending is met or length threshold exceeded. | |
| Source & | get_source () |
| Underlying source accessor. | |
| std::array< char, buf_size > & | get_buffer () |
| Buffer accessor. | |
Source wrapper that buffers the input.
|
inlineexplicit |
Constructor, created source wrapper will own specified source.
| src | input source |
| staticlib::io::buffered_source< Source, buf_size >::buffered_source | ( | const buffered_source< Source, buf_size > & | ) |
Deleted copy constructor.
| other | instance |
|
inline |
Move constructor.
| other | other instance |
|
inline |
Buffer accessor.
|
inline |
Underlying source accessor.
| buffered_source& staticlib::io::buffered_source< Source, buf_size >::operator= | ( | const buffered_source< Source, buf_size > & | ) |
Deleted copy assignment operator.
| other | instance |
|
inline |
Move assignment operator.
| other | other instance |
|
inline |
Buffered read implementation.
| span | buffer span |
|
inline |
Reads underlying source until specified line ending is met or length threshold exceeded.
Lines consisting solely of line endings will be ignored.
| ending | line ending |
| max_length | length threshold |
1.8.1.2