Gobelijn API documentation
- generated for commit a0cbea7
|
A file that supports random reads: reads that are based on an offset. More...
#include <random-read-file.h>
Public Member Functions | |
RandomReadFile (const char *path) | |
Opens a random-read file at the given path. More... | |
char | operator[] (size_t Offset) const |
Private Attributes | |
File | m_file |
std::vector< char > | m_buf |
A file that supports random reads: reads that are based on an offset.
This differs from the typical sequential reads that are performed when working with stream-based file APIs. To avoid seeking, this class will store all previously read data in a buffer. This class uses logical constness. Note: this is a header-only class.
Definition at line 36 of file random-read-file.h.
|
inline |
Opens a random-read file at the given path.
Definition at line 42 of file random-read-file.h.
|
inline |
Definition at line 47 of file random-read-file.h.
References m_buf, m_file, and Raii::File::ReadChar().
|
mutableprivate |
Definition at line 75 of file random-read-file.h.
Referenced by operator[]().
|
mutableprivate |
Definition at line 79 of file random-read-file.h.
Referenced by operator[]().