Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CascadeMemoryStream Class Reference

imepments memory based streams More...

#include <cascade/util/CascadeMemoryStream.h>

Inheritance diagram for CascadeMemoryStream:

CascadeStream CascadeObject List of all members.

Public Member Functions

 CascadeMemoryStream ()
 CascadeMemoryStream (void *pMem, u32 nBytes)
virtual ~CascadeMemoryStream ()
virtual bool AttachMemory (void *pMem, u32 nBytes)
virtual u64 GetSize ()
virtual u64 GetPosition ()
virtual bool SeekToPosition (u64 nPosition)
virtual u32 ReadBytes (u32 nBytes, void *pBuff)

Detailed Description

imepments memory based streams

Skip the description

CascadeMemoryStream allows streams to be read from memory. The main purpose of CascadeMemoryStream is allow you to use memory when a CascadeStream object is required.


class CascadeMemoryStream


Constructor & Destructor Documentation

CascadeMemoryStream::CascadeMemoryStream  ) 
 

default constructor

This constructor is light weight.

CascadeMemoryStream::CascadeMemoryStream void *  pMem,
u32  nBytes
 

parameterized constructor

This constructor attaches memory to the stream when constructed.

Parameters:
pMem the memory to attach
nBytes the number of bytes (starting at pMem) to attach

virtual CascadeMemoryStream::~CascadeMemoryStream  )  [virtual]
 

the destructor

This destructor is light weight.


Member Function Documentation

virtual bool CascadeMemoryStream::AttachMemory void *  pMem,
u32  nBytes
[virtual]
 

attaches existing memory for reading as a stream

AttachMemory() attaches existing memory to the CascadeMemoryStream object, allowing the memory to be used as a stream source wherever a CascadeStream object is required.

Parameters:
pMem the memory to attach
nBytes the number of bytes (starting at pMem) to attach
Returns:
whether or not the attachment was successful.

virtual u64 CascadeMemoryStream::GetPosition  )  [virtual]
 

returns the current position in the stream

Returns the current position in the stream.

Returns:
the current position in the stream

Implements CascadeStream.

virtual u64 CascadeMemoryStream::GetSize  )  [virtual]
 

returns the size of the stream

Returns number of total bytes in the stream. The size doesn't change as bytes are read or the position is seeked to.

Returns:
the size of the data stream in bytes

Implements CascadeStream.

virtual u32 CascadeMemoryStream::ReadBytes u32  nBytes,
void *  pBuff
[virtual]
 

reads bytes from the stream

Reads bytes from the stream.

Returns:
the number of bytes actually read from the stream

Implements CascadeStream.

virtual bool CascadeMemoryStream::SeekToPosition u64  nPosition  )  [virtual]
 

seeks to a position in the stream

SeekToPositions seeks to a byte position in the stream.

Returns:
whether or not the seek succeeded

Implements CascadeStream.


The documentation for this class was generated from the following file:
Generated on Sun Jul 24 14:27:19 2005 for Cascade Library by  doxygen 1.4.1