GProxyStream Class Reference

#include <GStream.h>

Inheritance diagram for GProxyStream:

GStreamI GTempStream

List of all members.

Public Member Functions

int Open (const char *Str, int Int)
bool IsOpen ()
 Returns true is the stream is still open.
int Close ()
int64 GetSize ()
 Gets the size of the stream.
int64 SetSize (int64 Size)
 Sets the size of the stream.
int64 GetPos ()
 Gets the current position of the stream.
int64 SetPos (int64 Pos)
 Sets the current position of the stream.
int Read (void *b, int l, int f=0)
 Read bytes out of the stream.
int Write (const void *b, int l, int f=0)
 Write bytes to the stream.
GStreamIClone ()
 Creates a dynamically allocated copy of the same type of stream. This new stream is not connected to anything.


Detailed Description

Wraps another stream in a GStreamI interface. Useful for giving objects to downstream consumers that they can delete.

Member Function Documentation

int GProxyStream::Open ( const char *  Str,
int  Int 
) [inline, virtual]

Open a connection

Returns:
> zero on success

Reimplemented from GStreamI.

int GProxyStream::Close (  )  [inline, virtual]

Closes the connection

Returns:
> zero on success

Reimplemented from GStreamI.

int64 GProxyStream::GetSize (  )  [inline, virtual]

Gets the size of the stream.

Returns:
The size or -1 on error (e.g. the information is not available)

Reimplemented from GStreamI.

int64 GProxyStream::SetSize ( int64  Size  )  [inline, virtual]

Sets the size of the stream.

Returns:
The new size or -1 on error (e.g. the size is not set-able)

Reimplemented from GStreamI.

int64 GProxyStream::GetPos (  )  [inline, virtual]

Gets the current position of the stream.

Returns:
Current position or -1 on error (e.g. the position is not known)

Reimplemented from GStreamI.

int64 GProxyStream::SetPos ( int64  Pos  )  [inline, virtual]

Sets the current position of the stream.

Returns:
The new current position or -1 on error (e.g. the position can't be set)

Reimplemented from GStreamI.

int GProxyStream::Read ( void *  Buffer,
int  Size,
int  Flags = 0 
) [inline, virtual]

Read bytes out of the stream.

Returns:
> 0 on succes, which indicates the number of bytes read

Implements GStreamI.

int GProxyStream::Write ( const void *  Buffer,
int  Size,
int  Flags = 0 
) [inline, virtual]

Write bytes to the stream.

Returns:
> 0 on succes, which indicates the number of bytes written

Implements GStreamI.

Reimplemented in GTempStream.

Referenced by GTempStream::Write().

GStreamI* GProxyStream::Clone (  )  [inline, virtual]

Creates a dynamically allocated copy of the same type of stream. This new stream is not connected to anything.

Returns:
The new stream or NULL on error.

Reimplemented from GStreamI.


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

Generated on Wed May 11 07:51:58 2011 for Lgi by  doxygen 1.5.6