Base class for input (read) streams with minimal implementation. More...
#include <datastream.h>
Public Member Functions | |
IStream (std::streambuf *Buf) | |
Class constructor. More... | |
virtual | ~IStream () |
Class destructor. | |
virtual Boole | Bad () const |
Gets whether or not a critical error was detected in a previous operation in the stream. More... | |
virtual void | ClearErrors () |
Clears any stored error state on the stream. More... | |
virtual Boole | EoF () const |
Gets whether or not the current position is at the end of the stream. More... | |
virtual Boole | Fail () const |
Gets whether or not an otherwise silent and recoverable error was detected in a previous operation in the stream. More... | |
virtual StreamPos | GetReadPosition () |
Gets the current read position in this stream. More... | |
virtual Boole | IsValid () const |
Gets whether or not this stream is intact and ready for operations. More... | |
virtual size_t | Read (void *Buffer, StreamSize Size) |
Reads from the stream and copies that data to a buffer. More... | |
virtual void | SetReadPosition (StreamPos Position) |
Sets the position of the read cursor explicitly. More... | |
virtual void | SetReadPosition (StreamOff Offset, SeekOrigin Origin) |
Sets the position of the read cursor. More... | |
Public Member Functions inherited from Mezzanine::Resource::iInStream | |
iInStream () | |
Class constructor. | |
virtual | ~iInStream () |
Class destructor. | |
Public Member Functions inherited from Mezzanine::Resource::iStreamBase | |
iStreamBase () | |
Class constructor. | |
virtual | ~iStreamBase () |
Class destructor. | |
virtual StreamSize | GetSize () const =0 |
Gets the size of the stream. More... | |
Base class for input (read) streams with minimal implementation.
Definition at line 181 of file datastream.h.
Mezzanine::Resource::IStream::IStream | ( | std::streambuf * | Buf | ) |
Class constructor.
Buf | A pointer to the buffer that will be streamed. |
Definition at line 60 of file datastream.cpp.
|
virtual |
Gets whether or not a critical error was detected in a previous operation in the stream.
Implements Mezzanine::Resource::iStreamBase.
Definition at line 73 of file datastream.cpp.
|
virtual |
Clears any stored error state on the stream.
Implements Mezzanine::Resource::iStreamBase.
Definition at line 82 of file datastream.cpp.
|
virtual |
Gets whether or not the current position is at the end of the stream.
Implements Mezzanine::Resource::iStreamBase.
Definition at line 70 of file datastream.cpp.
|
virtual |
Gets whether or not an otherwise silent and recoverable error was detected in a previous operation in the stream.
Implements Mezzanine::Resource::iStreamBase.
Definition at line 76 of file datastream.cpp.
|
virtual |
Gets the current read position in this stream.
Implements Mezzanine::Resource::iInStream.
Definition at line 100 of file datastream.cpp.
|
virtual |
Gets whether or not this stream is intact and ready for operations.
Implements Mezzanine::Resource::iStreamBase.
Definition at line 79 of file datastream.cpp.
|
virtual |
Reads from the stream and copies that data to a buffer.
Buffer | The buffer to be populated with the read data. |
Size | The number of bytes to read from the stream. |
Implements Mezzanine::Resource::iInStream.
Definition at line 88 of file datastream.cpp.
|
virtual |
Sets the position of the read cursor explicitly.
Position | The position to be set. |
Implements Mezzanine::Resource::iInStream.
Definition at line 94 of file datastream.cpp.
|
virtual |
Sets the position of the read cursor.
Offset | The number of bytes to move the read cursor back(if negative) or forward(if positive). |
Origin | The starting point to be considered for the offset. |
Implements Mezzanine::Resource::iInStream.
Definition at line 97 of file datastream.cpp.