CrystalSpace

Public API Reference

iStreamSource Struct Reference
[Loading & Saving support]

This interface represents a stream source. More...

#include <imap/streamsource.h>

Inheritance diagram for iStreamSource:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual bool QueryBuffer (const char *id, iStreamDataCallback *callback)=0
 Load a buffer given an id.
virtual bool SaveBuffer (const char *id, iDataBuffer *buffer)=0
 Save a buffer with some id.

Detailed Description

This interface represents a stream source.

This can be implemented by the application to implement faster loading of data. Basically the idea is to have some kind of 'id' that represents a buffer for a mesh. This implementation of this interface can try to load the buffer given that id.

Definition at line 51 of file streamsource.h.


Member Function Documentation

virtual bool iStreamSource::QueryBuffer ( const char *  id,
iStreamDataCallback callback 
) [pure virtual]

Load a buffer given an id.

This will fire the callback as soon as the buffer is ready. Note that some implementations that don't support asynchronious loading may call the callback immediatelly from within this function.

Returns:
false if we can't find the buffer (early error). The error should be placed on the reporter.

virtual bool iStreamSource::SaveBuffer ( const char *  id,
iDataBuffer buffer 
) [pure virtual]

Save a buffer with some id.

Returns false if the buffer couldn't be saved for some reason. The error should be reported on the reporter by this function.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7