PNTK
|
#include <gui_stream.h>
Public Member Functions | |
virtual long int | seek (long int offset, int origin) |
virtual bool | eof () |
template<typename T > | |
long int | read (T &object) |
std::string | readstring (long int size) |
virtual long int | read (void *buffer, long int size)=0 |
virtual long int | seek (long int position)=0 |
virtual long int | tell ()=0 |
virtual long int | size ()=0 |
A portable stream abstraction class.
|
virtual |
Returns whether the stream has ended or not, based on abstract size() and tell() unless otherwise overriden.
Reimplemented in pntk::gui_stream_file, and pntk::gui_stream_memory.
|
inline |
Reads a type as binary data without swizzling, based on abstract read().
|
pure virtual |
Abstract reading which should be implemented by gui_stream derivatives. Returns number of bytes read.
Implemented in pntk::gui_stream_file, and pntk::gui_stream_memory.
std::string pntk::gui_stream::readstring | ( | long int | size | ) |
Reads a string as binary data, based on abstract read().
|
virtual |
Seeks the stream, which just wraps the abstract seek() unless otherwise overriden.
|
pure virtual |
Abstract seeking which should be implemented by gui_stream derivatives. Returns new absolute location in bytes.
Implemented in pntk::gui_stream_file, and pntk::gui_stream_memory.
|
pure virtual |
Abstract size which should be implemented by gui_stream derivatives. Returns size of buffer in bytes.
Implemented in pntk::gui_stream_file, and pntk::gui_stream_memory.
|
pure virtual |
Abstract read which should be implemented by gui_stream derivatives. Returns absolutely location in bytes.
Implemented in pntk::gui_stream_file, and pntk::gui_stream_memory.