zeus::IInputStream Class Reference

#include <IInputStream.hpp>

Inheritance diagram for zeus::IInputStream:

zeus::IZUnknown zeus::TAbstractInputStream zeus::TBluetoothSocket zeus::TSerialConnection zeus::TSocket zeus::TByteArrayInputStream zeus::TFileInputStream zeus::TFilterInputStream zeus::TBase64InputStream zeus::TCryptedInputStream zeus::TTextInputStream zeus::TZippedInputStream

List of all members.

Public Member Functions

virtual bool MQUALIFIER available () const =0
virtual bool MQUALIFIER isEndReached () const =0
virtual Retval MQUALIFIER read (char *pBuffer, Int iBufferSize, Int &rValidSize) const =0
virtual Int MQUALIFIER readItem () const =0
virtual Int8 MQUALIFIER readInt8 (bool *pError) const =0
virtual Int16 MQUALIFIER readInt16 (bool *pError) const =0
virtual Int32 MQUALIFIER readInt32 (bool *pError) const =0
virtual Int64 MQUALIFIER readInt64 (bool *pError) const =0
virtual Uint8 MQUALIFIER readUint8 (bool *pError) const =0
virtual Uint16 MQUALIFIER readUint16 (bool *pError) const =0
virtual Uint32 MQUALIFIER readUint32 (bool *pError) const =0
virtual Uint64 MQUALIFIER readUint64 (bool *pError) const =0
virtual Float32 MQUALIFIER readFloat32 (bool *pError) const =0
virtual Float64 MQUALIFIER readFloat64 (bool *pError) const =0
virtual bool MQUALIFIER readBool (bool *pError) const =0
virtual Retval MQUALIFIER readArray (IByteArray &rData) const =0
virtual Retval MQUALIFIER readString (IString &rData) const =0
virtual void MQUALIFIER close ()=0
virtual void MQUALIFIER reset ()=0
virtual bool MQUALIFIER skip (Int iBytes=1)=0


Detailed Description

Interface is defining a input stream

Member Function Documentation

virtual bool MQUALIFIER zeus::IInputStream::available (  )  const [pure virtual]

Returns if the input stream is available (valid).

Return values:
true : stream is ok
false : invalid stream

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, zeus::TByteArrayInputStream, and zeus::TFilterInputStream.

virtual bool MQUALIFIER zeus::IInputStream::isEndReached (  )  const [pure virtual]

This method checks if the stream is at the end. If a stream is at the end the methods readDouble(), readLong(), readByte() and readBool() should not called anymore. They will return zero. You must call this method before getting data from the stream.

Return values:
true : Stream is at the end
false : Stream is not at the end

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, zeus::TByteArrayInputStream, zeus::TFileInputStream, and zeus::TFilterInputStream.

virtual Retval MQUALIFIER zeus::IInputStream::read ( char *  pBuffer,
Int  iBufferSize,
Int &  rValidSize 
) const [pure virtual]

Reads from a stream into a buffer

Parameters:
pBuffer : Char Array
lBufferSize : Size of the Array
rValidSize : Length of the read buffer (return parameter)
Return values:
RET_NOERROR : Reading was successful
RET_REQUEST_FAILED : Could not read from Socket

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TCryptedInputStream, zeus::TAbstractInputStream, zeus::TBase64InputStream, zeus::TByteArrayInputStream, zeus::TFileInputStream, zeus::TFilterInputStream, zeus::TTextInputStream, and zeus::TZippedInputStream.

virtual Int MQUALIFIER zeus::IInputStream::readItem (  )  const [pure virtual]

Reads a single item from a stream. The size of item is 8bit large.

Returns:
item value. If the stream has an error INVALID_DATA is returned.

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TCryptedInputStream, zeus::TAbstractInputStream, zeus::TBase64InputStream, zeus::TByteArrayInputStream, zeus::TFileInputStream, zeus::TFilterInputStream, zeus::TTextInputStream, and zeus::TZippedInputStream.

virtual Int8 MQUALIFIER zeus::IInputStream::readInt8 ( bool *  pError  )  const [pure virtual]

Reads an int8 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
int8 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Int16 MQUALIFIER zeus::IInputStream::readInt16 ( bool *  pError  )  const [pure virtual]

Reads an int16 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
int16 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Int32 MQUALIFIER zeus::IInputStream::readInt32 ( bool *  pError  )  const [pure virtual]

Reads an int32 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
int32 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Int64 MQUALIFIER zeus::IInputStream::readInt64 ( bool *  pError  )  const [pure virtual]

Reads an int64 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
int64 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Uint8 MQUALIFIER zeus::IInputStream::readUint8 ( bool *  pError  )  const [pure virtual]

Reads an unsigned int8 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
unsigned int8 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, and zeus::TAbstractInputStream.

virtual Uint16 MQUALIFIER zeus::IInputStream::readUint16 ( bool *  pError  )  const [pure virtual]

Reads an unsigned int16 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
unsigned int16 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Uint32 MQUALIFIER zeus::IInputStream::readUint32 ( bool *  pError  )  const [pure virtual]

Reads an unsigned int32 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
unsigned int32 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Uint64 MQUALIFIER zeus::IInputStream::readUint64 ( bool *  pError  )  const [pure virtual]

Reads an unsigned int64 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
unsigned int64 value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Float32 MQUALIFIER zeus::IInputStream::readFloat32 ( bool *  pError  )  const [pure virtual]

Reads a Float32 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
float value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Float64 MQUALIFIER zeus::IInputStream::readFloat64 ( bool *  pError  )  const [pure virtual]

Reads a Float64 value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
float value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual bool MQUALIFIER zeus::IInputStream::readBool ( bool *  pError  )  const [pure virtual]

Reads a bool value from a stream

Parameters:
pError : Error return flag. If *pError = true an error has been occured reading from the stream
Returns:
bool value

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Retval MQUALIFIER zeus::IInputStream::readArray ( IByteArray rData  )  const [pure virtual]

Reads an array of bytes from a stream. This method uses special notation of the buffer and can only be used if the stream has written using writeArray() method. First 4 Bytes read gives the size of the following byte array to read. [4][3][2][1] = size, [0][1]..[size].

Parameters:
rData : Return parameter
Return values:
RET_NOERROR : Bytes readed

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual Retval MQUALIFIER zeus::IInputStream::readString ( IString rData  )  const [pure virtual]

Reads a string (16bit based) from the stream. This method uses spaecial notation of the buffer and can only be used if the stream has been written using writeString() method. First 4 bytes represent the size of the string. [4][3][2][1] = size, [0_h][0_l][1_h][1_l]..[size_h][size_l]. Note that this method is able to handle unicode.

Parameters:
rData : Return parameter
Return values:
RET_NOERROR : String readed

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, and zeus::TTextInputStream.

virtual void MQUALIFIER zeus::IInputStream::close (  )  [pure virtual]

virtual void MQUALIFIER zeus::IInputStream::reset (  )  [pure virtual]

virtual bool MQUALIFIER zeus::IInputStream::skip ( Int  iBytes = 1  )  [pure virtual]

This method is used to skip a number of bytes

Parameters:
iBytes : Number of bytes to skip (default = 1)
Return values:
true : Byte skipped
false,: Error or end of stream reached

Implemented in zeus::TBluetoothSocket, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractInputStream, zeus::TByteArrayInputStream, zeus::TFileInputStream, and zeus::TFilterInputStream.


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:34 2009