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

Base class interface for resource streams. More...

#include <datastream.h>

+ Inheritance diagram for Mezzanine::Resource::iStreamBase:

Public Member Functions

 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

Base class interface for resource streams.

Definition at line 88 of file datastream.h.

Member Function Documentation

virtual Boole Mezzanine::Resource::iStreamBase::Bad ( ) const
pure virtual

Gets whether or not a critical error was detected in a previous operation in the stream.

Returns
Returns true if a critical error has occurred and the stream integrity may be invalid, false otherwise.

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

virtual void Mezzanine::Resource::iStreamBase::ClearErrors ( )
pure virtual

Clears any stored error state on the stream.

Remarks
This is useful for non-critical errors such as ones that cause "EoF()" or "Fail()" to return true but not "Bad()". Using this to clear critical errors is not advised.

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

virtual Boole Mezzanine::Resource::iStreamBase::EoF ( ) const
pure virtual

Gets whether or not the current position is at the end of the stream.

Returns
Returns true if the current position has reached the end of the stream, false otherwise.

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

virtual Boole Mezzanine::Resource::iStreamBase::Fail ( ) const
pure virtual

Gets whether or not an otherwise silent and recoverable error was detected in a previous operation in the stream.

Returns
Returns true if a non-critical operation failed (such as seek), false otherwise.

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

virtual StreamSize Mezzanine::Resource::iStreamBase::GetSize ( ) const
pure virtual

Gets the size of the stream.

Returns
Returns the size of this stream in bytes.

Implemented in Mezzanine::Resource::MemoryStream, and Mezzanine::Resource::FileStream.

virtual Boole Mezzanine::Resource::iStreamBase::IsValid ( ) const
pure virtual

Gets whether or not this stream is intact and ready for operations.

Returns
Returns true if no failures have been detected, false otherwise.

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


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