Data stream implementation for local file I/O using std::ifstream.
More...
#include <datastream.h>
Data stream implementation for local file I/O using std::ifstream.
Definition at line 108 of file datastream.h.
◆ datastreamLocalFile()
| hipo::datastreamLocalFile::datastreamLocalFile |
( |
| ) |
|
◆ ~datastreamLocalFile()
| hipo::datastreamLocalFile::~datastreamLocalFile |
( |
| ) |
|
|
inline |
Destructor; closes the file if open.
Definition at line 118 of file datastream.h.
◆ open()
| void hipo::datastreamLocalFile::open |
( |
const char * |
filename | ) |
|
|
inline |
Open a local file for binary reading.
- Parameters
-
Definition at line 135 of file datastream.h.
◆ position() [1/2]
| long hipo::datastreamLocalFile::position |
( |
| ) |
|
|
inline |
- Returns
- Current read position in bytes.
Definition at line 139 of file datastream.h.
◆ position() [2/2]
| long hipo::datastreamLocalFile::position |
( |
long |
pos | ) |
|
|
inline |
Seek to the given byte position.
- Parameters
-
| pos | Byte offset from the beginning |
- Returns
- The new position
Definition at line 143 of file datastream.h.
◆ read()
| int hipo::datastreamLocalFile::read |
( |
char * |
s, |
|
|
int |
size |
|
) |
| |
|
inline |
Read bytes from the file.
- Parameters
-
| s | Destination buffer |
| size | Number of bytes to read |
- Returns
- Number of bytes read
Definition at line 148 of file datastream.h.
◆ size()
| long hipo::datastreamLocalFile::size |
( |
| ) |
|
|
inline |
- Returns
- Total file size in bytes.
Definition at line 125 of file datastream.h.
The documentation for this class was generated from the following file: