|
foobar2000 SDK
2015-01-14
|
#include <filesystem.h>
Inheritance diagram for foobar2000_io::stream_reader:Public Member Functions | |
| virtual t_size | read (void *p_buffer, t_size p_bytes, abort_callback &p_abort)=0 |
| template<typename T > | |
| void | read_bendian_t (T &p_object, abort_callback &p_abort) |
| template<typename T > | |
| void | read_lendian_t (T &p_object, abort_callback &p_abort) |
| virtual void | read_object (void *p_buffer, t_size p_bytes, abort_callback &p_abort) |
| template<typename T > | |
| void | read_object_t (T &p_object, abort_callback &p_abort) |
| void | read_string (pfc::string_base &p_out, abort_callback &p_abort) |
| pfc::string | read_string (abort_callback &p_abort) |
| void | read_string_ex (pfc::string_base &p_out, t_size p_bytes, abort_callback &p_abort) |
| pfc::string | read_string_ex (t_size p_len, abort_callback &p_abort) |
| void | read_string_nullterm (pfc::string_base &out, abort_callback &abort) |
| void | read_string_raw (pfc::string_base &p_out, abort_callback &p_abort) |
| template<typename t_outArray > | |
| void | read_till_eof (t_outArray &out, abort_callback &abort) |
| virtual t_filesize | skip (t_filesize p_bytes, abort_callback &p_abort) |
| virtual void | skip_object (t_filesize p_bytes, abort_callback &p_abort) |
| t_filesize | skip_till_eof (abort_callback &abort) |
Protected Member Functions | |
| stream_reader () | |
| ~stream_reader () | |
Generic interface to read data from a nonseekable stream. Also see: stream_writer, file.
Error handling: all methods may throw exception_io or one of derivatives on failure; exception_aborted when abort_callback is signaled.
Definition at line 87 of file filesystem.h.
|
inlineprotected |
Definition at line 154 of file filesystem.h.
|
inlineprotected |
Definition at line 155 of file filesystem.h.
|
pure virtual |
Attempts to reads specified number of bytes from the stream.
| p_buffer | Receives data being read. Must have at least p_bytes bytes of space allocated. |
| p_bytes | Number of bytes to read. |
| p_abort | abort_callback object signaling user aborting the operation. |
|
inline |
Helper template built around read_object. Reads single raw object from the stream; corrects byte order assuming stream uses big endian order.
| p_object | Receives object read from the stream on success. |
| p_abort | abort_callback object signaling user aborting the operation. |
Definition at line 121 of file filesystem.h.
|
inline |
Helper template built around read_object. Reads single raw object from the stream; corrects byte order assuming stream uses little endian order.
| p_object | Receives object read from the stream on success. |
| p_abort | abort_callback object signaling user aborting the operation. |
Definition at line 117 of file filesystem.h.
|
virtual |
Reads specified number of bytes from the stream. If requested amount of bytes can't be read (e.g. EOF), throws exception_io_data_truncation.
| p_buffer | Receives data being read. Must have at least p_bytes bytes of space allocated. |
| p_bytes | Number of bytes to read. |
| p_abort | abort_callback object signaling user aborting the operation. |
Definition at line 590 of file filesystem.cpp.
|
inline |
Helper template built around read_object. Reads single raw object from the stream.
| p_object | Receives object read from the stream on success. |
| p_abort | abort_callback object signaling user aborting the operation. |
Definition at line 113 of file filesystem.h.
| void stream_reader::read_string | ( | pfc::string_base & | p_out, |
| abort_callback & | p_abort | ||
| ) |
Helper function; reads a string (with a 32-bit header indicating length in bytes followed by UTF-8 encoded data without a null terminator).
Definition at line 709 of file filesystem.cpp.
| pfc::string stream_reader::read_string | ( | abort_callback & | p_abort | ) |
Helper function; reads a string (with a 32-bit header indicating length in bytes followed by UTF-8 encoded data without a null terminator).
Definition at line 965 of file filesystem.cpp.
| void stream_reader::read_string_ex | ( | pfc::string_base & | p_out, |
| t_size | p_bytes, | ||
| abort_callback & | p_abort | ||
| ) |
Helper function; reads a string of specified length from the stream.
Definition at line 689 of file filesystem.cpp.
| pfc::string stream_reader::read_string_ex | ( | t_size | p_len, |
| abort_callback & | p_abort | ||
| ) |
Helper function; reads a string of specified length from the stream.
Definition at line 970 of file filesystem.cpp.
| void stream_reader::read_string_nullterm | ( | pfc::string_base & | out, |
| abort_callback & | abort | ||
| ) |
Definition at line 1028 of file filesystem.cpp.
| void stream_reader::read_string_raw | ( | pfc::string_base & | p_out, |
| abort_callback & | p_abort | ||
| ) |
Helper function; alternate way of storing strings; assumes string takes space up to end of stream.
Definition at line 716 of file filesystem.cpp.
|
inline |
Definition at line 140 of file filesystem.h.
|
virtual |
Attempts to skip specified number of bytes in the stream.
| p_bytes | Number of bytes to skip. |
| p_abort | abort_callback object signaling user aborting the operation. |
Reimplemented in foobar2000_io::file.
Definition at line 602 of file filesystem.cpp.
|
virtual |
Skips specified number of bytes in the stream. If requested amount of bytes can't be skipped (e.g. EOF), throws exception_io_data_truncation.
| p_bytes | Number of bytes to skip. |
| p_abort | abort_callback object signaling user aborting the operation. |
Definition at line 618 of file filesystem.cpp.
| t_filesize stream_reader::skip_till_eof | ( | abort_callback & | abort | ) |
Definition at line 1045 of file filesystem.cpp.
1.8.9.1