Beatmup
|
InputStream reading from a file. More...
#include <input_stream.h>
Public Member Functions | |
FileInputStream () | |
FileInputStream (const char *filename) | |
bool | isOpen () const |
void | open (const char *filename) |
void | close () |
void | clear () |
bool | operator() (void *buffer, msize bytes) |
Reads a given number of bytes into a specific memory location. More... | |
bool | seek (msize pos) |
Moves the read pointer to a given position in the stream. More... | |
bool | eof () const |
Returns true , if the end of the stream is reached (i.e., all the data is read or the stream is empty). More... | |
Private Attributes | |
std::ifstream | stream |
InputStream reading from a file.
Definition at line 54 of file input_stream.h.
FileInputStream::FileInputStream | ( | ) |
Definition at line 24 of file input_stream.cpp.
|
inline |
Definition at line 59 of file input_stream.h.
bool FileInputStream::isOpen | ( | ) | const |
Definition at line 27 of file input_stream.cpp.
void FileInputStream::open | ( | const char * | filename | ) |
Definition at line 31 of file input_stream.cpp.
void FileInputStream::close | ( | ) |
Definition at line 35 of file input_stream.cpp.
void FileInputStream::clear | ( | ) |
Definition at line 39 of file input_stream.cpp.
|
virtual |
Reads a given number of bytes into a specific memory location.
[in] | buffer | The address to store the data to |
[in] | bytes | Number of bytes to read |
true
on success. Implements Beatmup::InputStream.
Definition at line 44 of file input_stream.cpp.
|
virtual |
Moves the read pointer to a given position in the stream.
pos | The position in bytes from the beginning of the stream |
true
on success. Implements Beatmup::InputStream.
Definition at line 49 of file input_stream.cpp.
|
virtual |
Returns true
, if the end of the stream is reached (i.e., all the data is read or the stream is empty).
Implements Beatmup::InputStream.
Definition at line 54 of file input_stream.cpp.
|
private |
Definition at line 56 of file input_stream.h.