Main Page   Compound List   File List   Compound Members   File Members  

ContentSource Class Reference

#include <ContentSource.h>

List of all members.

Public Methods

virtual ~ContentSource ()
virtual unsigned long getBytesRemaining ()=0
virtual int readContent (unsigned char *outDestinationBuffer, unsigned long inBytesToRead)=0
virtual void skipContent (unsigned long inBytesToSkip)=0
virtual void restart ()=0
virtual void clear ()=0
virtual ContentSource* copy ()=0


Detailed Description

Interface for a class that can provide buffers full of content.

Author:
Jason Rohrer


Constructor & Destructor Documentation

ContentSource::~ContentSource ( ) [virtual]
 


Member Function Documentation

void ContentSource::clear ( ) [pure virtual]
 

Destroys the content underlying this source.

For example, if this content source reads from a file on disk, calling clear() on this source will remove the file from the disk.

Calling clear() may render a content source unusable.

ContentSource * ContentSource::copy ( ) [pure virtual]
 

Makes a deep copy of this source.

Parameters:
a   copy of this source. Must be destroyed by caller.

unsigned long ContentSource::getBytesRemaining ( ) [pure virtual]
 

Gets the number of bytes remaining to be read.

Returns:
the number of bytes remaining.

int ContentSource::readContent ( unsigned char * outDestinationBuffer,
unsigned long inBytesToRead ) [pure virtual]
 

Reads a buffer full of content.

Parameters:
outDestinationBuffer   the buffer to place the read bytes in. Must be allocated and destroyed by caller.
inBytesToRead   the number of bytes to read into outDestinationBuffer.

Returns:
the number of bytes read successfully.

void ContentSource::restart ( ) [pure virtual]
 

Restarts this content source so that readContent will re-read the first byte.

void ContentSource::skipContent ( unsigned long inBytesToSkip ) [pure virtual]
 

Skips content.

Parameters:
inBytesToSkip   the number of bytes to skip.


The documentation for this class was generated from the following file:
Generated at Tue Oct 29 12:29:29 2002 for konspire2b API by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001