#include <filesystem.h>

Public Member Functions | |
| virtual t_size | read (void *p_buffer, t_size p_bytes, abort_callback &p_abort)=0 |
| virtual void | read_object (void *p_buffer, t_size p_bytes, abort_callback &p_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) |
| template<typename T> | |
| void | read_object_t (T &p_object, abort_callback &p_abort) |
| template<typename T> | |
| void | read_lendian_t (T &p_object, abort_callback &p_abort) |
| template<typename T> | |
| void | read_bendian_t (T &p_object, abort_callback &p_abort) |
| void | 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). | |
| void | 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. | |
| pfc::string | 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). | |
| void | 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. | |
| pfc::string | read_string_ex (t_size p_len, abort_callback &p_abort) |
| Helper function; reads a string of specified length from the stream. | |
Protected Member Functions | |
| stream_reader () | |
| ~stream_reader () | |
| foobar2000_io::stream_reader::stream_reader | ( | ) | [inline, protected] |
| foobar2000_io::stream_reader::~stream_reader | ( | ) | [inline, protected] |
| virtual t_size foobar2000_io::stream_reader::read | ( | void * | p_buffer, | |
| t_size | p_bytes, | |||
| abort_callback & | p_abort | |||
| ) | [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. |
| virtual void foobar2000_io::stream_reader::read_object | ( | void * | p_buffer, | |
| t_size | p_bytes, | |||
| abort_callback & | p_abort | |||
| ) | [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. |
| virtual t_filesize foobar2000_io::stream_reader::skip | ( | t_filesize | p_bytes, | |
| abort_callback & | p_abort | |||
| ) | [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.
| virtual void foobar2000_io::stream_reader::skip_object | ( | t_filesize | p_bytes, | |
| abort_callback & | p_abort | |||
| ) | [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. |
| void foobar2000_io::stream_reader::read_object_t | ( | T & | p_object, | |
| abort_callback & | p_abort | |||
| ) | [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. |
| void foobar2000_io::stream_reader::read_lendian_t | ( | T & | p_object, | |
| abort_callback & | p_abort | |||
| ) | [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. |
| void foobar2000_io::stream_reader::read_bendian_t | ( | T & | p_object, | |
| abort_callback & | p_abort | |||
| ) | [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. |
| void foobar2000_io::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).
| void foobar2000_io::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.
| pfc::string foobar2000_io::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).
| void foobar2000_io::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.
| pfc::string foobar2000_io::stream_reader::read_string_ex | ( | t_size | p_len, | |
| abort_callback & | p_abort | |||
| ) |
Helper function; reads a string of specified length from the stream.
1.5.5