Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | List of all members
Mezzanine::Resource::iInStream Class Referenceabstract

Interface class for input (read) streams. More...

#include <datastream.h>

+ Inheritance diagram for Mezzanine::Resource::iInStream:
+ Collaboration diagram for Mezzanine::Resource::iInStream:

Public Member Functions

 iInStream ()
 Class constructor.
 
virtual ~iInStream ()
 Class destructor.
 
virtual StreamPos GetReadPosition ()=0
 Gets the current read position in this stream. More...
 
virtual size_t Read (void *Buffer, StreamSize Size)=0
 Reads from the stream and copies that data to a buffer. More...
 
virtual void SetReadPosition (StreamPos Position)=0
 Sets the position of the read cursor explicitly. More...
 
virtual void SetReadPosition (StreamOff Offset, SeekOrigin Origin)=0
 Sets the position of the read cursor. More...
 
- Public Member Functions inherited from Mezzanine::Resource::iStreamBase
 iStreamBase ()
 Class constructor.
 
virtual ~iStreamBase ()
 Class destructor.
 
virtual Boole Bad () const =0
 Gets whether or not a critical error was detected in a previous operation in the stream. More...
 
virtual void ClearErrors ()=0
 Clears any stored error state on the stream. More...
 
virtual Boole EoF () const =0
 Gets whether or not the current position is at the end of the stream. More...
 
virtual Boole Fail () const =0
 Gets whether or not an otherwise silent and recoverable error was detected in a previous operation in the stream. More...
 
virtual StreamSize GetSize () const =0
 Gets the size of the stream. More...
 
virtual Boole IsValid () const =0
 Gets whether or not this stream is intact and ready for operations. More...
 

Detailed Description

Interface class for input (read) streams.

Definition at line 121 of file datastream.h.

Member Function Documentation

virtual StreamPos Mezzanine::Resource::iInStream::GetReadPosition ( )
pure virtual

Gets the current read position in this stream.

Returns
Returns a StreamPos representing the current read position.

Implemented in Mezzanine::Resource::IOStream, and Mezzanine::Resource::IStream.

virtual size_t Mezzanine::Resource::iInStream::Read ( void *  Buffer,
StreamSize  Size 
)
pure virtual

Reads from the stream and copies that data to a buffer.

Parameters
BufferThe buffer to be populated with the read data.
SizeThe number of bytes to read from the stream.
Returns
Returns the number of bytes successfully read.

Implemented in Mezzanine::Resource::IOStream, and Mezzanine::Resource::IStream.

virtual void Mezzanine::Resource::iInStream::SetReadPosition ( StreamPos  Position)
pure virtual

Sets the position of the read cursor explicitly.

Parameters
PositionThe position to be set.

Implemented in Mezzanine::Resource::IOStream, and Mezzanine::Resource::IStream.

virtual void Mezzanine::Resource::iInStream::SetReadPosition ( StreamOff  Offset,
SeekOrigin  Origin 
)
pure virtual

Sets the position of the read cursor.

Parameters
OffsetThe number of bytes to move the read cursor back(if negative) or forward(if positive).
OriginThe starting point to be considered for the offset.

Implemented in Mezzanine::Resource::IOStream, and Mezzanine::Resource::IStream.


The documentation for this class was generated from the following file: