#include <LgiInterfaces.h>
Public Member Functions | |
virtual int | Open (const char *Str=0, int Int=0) |
virtual bool | IsOpen () |
Returns true is the stream is still open. | |
virtual int | Close () |
virtual int64 | GetSize () |
Gets the size of the stream. | |
virtual int64 | SetSize (int64 Size) |
Sets the size of the stream. | |
virtual int64 | GetPos () |
Gets the current position of the stream. | |
virtual int64 | SetPos (int64 Pos) |
Sets the current position of the stream. | |
virtual int | Read (void *Buffer, int Size, int Flags=0)=0 |
Read bytes out of the stream. | |
virtual int | Write (const void *Buffer, int Size, int Flags=0)=0 |
Write bytes to the stream. | |
virtual GStreamI * | Clone () |
Creates a dynamically allocated copy of the same type of stream. This new stream is not connected to anything. |
Defines the API for all the streaming data classes. Allows applications to plug different types of date streams into functions that take a GStream. Typically this means being able to swap files with sockets or data buffers etc.
virtual int GStreamI::Open | ( | const char * | Str = 0 , |
|
int | Int = 0 | |||
) | [inline, virtual] |
Open a connection
Str | A string connection parameter |
Int | An integer connection parameter |
Reimplemented in GFile, GMemStream, GProxyStream, and GSocket.
virtual int GStreamI::Close | ( | ) | [inline, virtual] |
Closes the connection
Reimplemented in GFile, GMemStream, GProxyStream, GSocket, and GFile.
Referenced by GdcBmp::WriteImage().
virtual int64 GStreamI::GetSize | ( | ) | [inline, virtual] |
Gets the size of the stream.
Reimplemented in GBytePipe, GFile, GMemStream, GProxyStream, GSocket, and GFile.
Referenced by GMemStream::GMemStream(), GXmlTree::Read(), GdcBmp::ReadImage(), GProcess::Run(), and GTempStream::Write().
Sets the size of the stream.
Reimplemented in GFile, GMemStream, GProxyStream, and GSocket.
Referenced by GXmlTree::Write(), and GdcBmp::WriteImage().
virtual int64 GStreamI::GetPos | ( | ) | [inline, virtual] |
Gets the current position of the stream.
Reimplemented in GFile, GMemStream, GProxyStream, and GSocket.
Referenced by GdcBmp::ReadImage().
Sets the current position of the stream.
Reimplemented in GFile, GMemStream, GProxyStream, and GSocket.
Referenced by GMemStream::GMemStream(), and GdcBmp::ReadImage().
virtual int GStreamI::Read | ( | void * | Buffer, | |
int | Size, | |||
int | Flags = 0 | |||
) | [pure virtual] |
Read bytes out of the stream.
Implemented in GBytePipe, GFile, GStream, GMemStream, GProxyStream, and GSocket.
Referenced by GMemStream::GMemStream(), and GXmlTree::Read().
virtual int GStreamI::Write | ( | const void * | Buffer, | |
int | Size, | |||
int | Flags = 0 | |||
) | [pure virtual] |
Write bytes to the stream.
Implemented in GBytePipe, GFile, GStream, GMemStream, GProxyStream, GTempStream, and GSocket.
Referenced by GXmlTree::EncodeEntities(), GStreamPrint(), GBytePipe::Peek(), and GXmlTree::Write().
virtual GStreamI* GStreamI::Clone | ( | ) | [inline, virtual] |
Creates a dynamically allocated copy of the same type of stream. This new stream is not connected to anything.
Reimplemented in GMemStream, and GProxyStream.