"L. Spiro Engine"
Public Types | Public Member Functions

lsstd::IStream Class Reference

The base interface for all streams. More...

#include <LSSTDStream.h>

Inheritance diagram for lsstd::IStream:
lsstd::CExternalByteStream

List of all members.

Public Types

enum  LSSTD_STREAM_ERRORS {
  LSSTD_SE_ERROR = ~0UL, LSSTD_SE_SUCCESS = 0UL, LSSTD_SE_MEMORYERROR = 1UL, LSSTD_SE_ENDOFSTREAM = 2UL,
  LSSTD_SE_FORCEDWORD = 0x7FFFFFFFUL
}

Public Member Functions

virtual LSUINT32 LSE_CALL ReadBytes (LSUINT8 *_pui8Buffer, LSUINT32 _ui32BytesToRead) const =0
virtual LSUINT64 LSE_CALL ReadUInt64 () const =0
virtual LSUINT32 LSE_CALL ReadUInt32 () const =0
virtual LSUINT16 LSE_CALL ReadUInt16 () const =0
virtual LSUINT8 LSE_CALL ReadUInt8 () const =0
virtual LSFLOAT LSE_CALL ReadFloat () const =0
virtual LSDOUBLE LSE_CALL ReadDouble () const =0
virtual LSUINT32 LSE_CALL WriteBytes (const LSUINT8 *_pui8Buffer, LSUINT32 _ui32BytesToWrite)=0
virtual LSBOOL LSE_CALL WriteUInt64 (const LSUINT64 &_ui64Value)=0
virtual LSBOOL LSE_CALL WriteUInt32 (LSUINT32 _ui32Value)=0
virtual LSBOOL LSE_CALL WriteUInt16 (LSUINT16 _ui16Value)=0
virtual LSBOOL LSE_CALL WriteUInt8 (LSUINT8 _ui8Value)=0
virtual LSBOOL LSE_CALL WriteFloat (LSFLOAT _fValue)=0
virtual LSBOOL LSE_CALL WriteDouble (const LSDOUBLE &_dValue)=0

Detailed Description

The base interface for all streams.

Class IStream Description: This interface serves as the base class for all streams. File streams, bit streams, network streams, etc., are built on top of this.


Member Enumeration Documentation

Error codes.

Enumerator:
LSSTD_SE_ERROR 

Error.

LSSTD_SE_SUCCESS 

No error.

LSSTD_SE_MEMORYERROR 

Memory failure.

LSSTD_SE_ENDOFSTREAM 

End of stream.

LSSTD_SE_FORCEDWORD 

Do not use.


Member Function Documentation

virtual LSUINT32 LSE_CALL lsstd::IStream::ReadBytes ( LSUINT8 *  _pui8Buffer,
LSUINT32  _ui32BytesToRead 
) const [pure virtual]

Read bytes from the stream. Stream position is advanced by the amount read.

Parameters:
_pui8BufferBuffer to hold the bytes read from the stream.
_ui32BytesToReadNumber of bytes to read.
Returns:
Returns the actual number of bytes read or LSSTD_SE_ERROR on error.

Implemented in lsstd::CExternalByteStream.

virtual LSDOUBLE LSE_CALL lsstd::IStream::ReadDouble ( ) const [pure virtual]

Reads a 64-bit double from the stream and advances the stream position.

Returns:
Returns the 64-bit double at the current position in the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSFLOAT LSE_CALL lsstd::IStream::ReadFloat ( ) const [pure virtual]

Reads a 32-bit float from the stream and advances the stream position.

Returns:
Returns the 32-bit float at the current position in the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSUINT16 LSE_CALL lsstd::IStream::ReadUInt16 ( ) const [pure virtual]

Reads a 16-bit unsigned integer from the stream and advances the stream position.

Returns:
Returns the 16-bit unsigned integer at the current position in the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSUINT32 LSE_CALL lsstd::IStream::ReadUInt32 ( ) const [pure virtual]

Reads a 32-bit unsigned integer from the stream and advances the stream position.

Returns:
Returns the 32-bit unsigned integer at the current position in the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSUINT64 LSE_CALL lsstd::IStream::ReadUInt64 ( ) const [pure virtual]

Reads a 64-bit unsigned integer from the stream and advances the stream position.

Returns:
Returns the 64-bit unsigned integer at the current position in the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSUINT8 LSE_CALL lsstd::IStream::ReadUInt8 ( ) const [pure virtual]

Reads an 8-bit unsigned integer from the stream and advances the stream position.

Returns:
Returns the 8-bit unsigned integer at the current position in the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSUINT32 LSE_CALL lsstd::IStream::WriteBytes ( const LSUINT8 *  _pui8Buffer,
LSUINT32  _ui32BytesToWrite 
) [pure virtual]

Write bytes to the stream. Stream position is advanced by the amount written.

Parameters:
_pui8BufferBuffer containing the bytes to write to the stream.
_ui32BytesToWriteNumber of bytes to write.
Returns:
Returns the actual number of bytes written or LSSTD_SE_ERROR on error.

Implemented in lsstd::CExternalByteStream.

virtual LSBOOL LSE_CALL lsstd::IStream::WriteDouble ( const LSDOUBLE &  _dValue) [pure virtual]

Writes a 64-bit double from the stream and advances the stream position.

Returns:
Returns true if the value was fully written to the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSBOOL LSE_CALL lsstd::IStream::WriteFloat ( LSFLOAT  _fValue) [pure virtual]

Writes a 32-bit float from the stream and advances the stream position.

Returns:
Returns true if the value was fully written to the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSBOOL LSE_CALL lsstd::IStream::WriteUInt16 ( LSUINT16  _ui16Value) [pure virtual]

Writes a 16-bit unsigned integer to the stream and advances the stream position.

Returns:
Returns true if the value was fully written to the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSBOOL LSE_CALL lsstd::IStream::WriteUInt32 ( LSUINT32  _ui32Value) [pure virtual]

Writes a 32-bit unsigned integer to the stream and advances the stream position.

Returns:
Returns true if the value was fully written to the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSBOOL LSE_CALL lsstd::IStream::WriteUInt64 ( const LSUINT64 &  _ui64Value) [pure virtual]

Writes a 64-bit unsigned integer to the stream and advances the stream position.

Returns:
Returns true if the value was fully written to the stream.

Implemented in lsstd::CExternalByteStream.

virtual LSBOOL LSE_CALL lsstd::IStream::WriteUInt8 ( LSUINT8  _ui8Value) [pure virtual]

Writes an 8-bit unsigned integer from the stream and advances the stream position.

Returns:
Returns true if the value was fully written to the stream.

Implemented in lsstd::CExternalByteStream.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator