- Cal3D 0.9 API Reference - |
#include <buffersource.h>
Inheritance diagram for CalBufferSource:
Public Methods | |
CalBufferSource (void *inputBuffer) | |
Constructs a buffer source instance from an existing memory buffer. More... | |
virtual | ~CalBufferSource () |
Destruct the CalBufferSource. More... | |
virtual bool | ok () const |
Checks whether the data source is in a good state. More... | |
virtual void | setError () const |
Sets the error code and message related to a memory buffer source. | |
virtual bool | readBytes (void *pBuffer, int length) |
Reads a number of bytes. More... | |
virtual bool | readFloat (float &value) |
Reads a float. More... | |
virtual bool | readInteger (int &value) |
Reads an integer. More... | |
virtual bool | readString (std::string &strValue) |
Reads a string. More... | |
Protected Attributes | |
void * | mInputBuffer |
unsigned int | mOffset |
This is an object designed to represent a source of Cal3d data as coming from a memory buffer.
|
Constructs a buffer source instance from an existing memory buffer. This function is the only constructor of the buffer source.
|
|
Destruct the CalBufferSource. Note that the memory is not deleted here; this should be handled externally. |
|
Checks whether the data source is in a good state. This function checks if the buffer is NULL or not.
Implements CalDataSource. |
|
Reads a number of bytes. This function reads a given number of bytes from this data source.
Implements CalDataSource. |
|
Reads a float. This function reads a float from this data source.
Implements CalDataSource. |
|
Reads an integer. This function reads an integer from this data source.
Implements CalDataSource. |
|
Reads a string. This function reads a string from this data source.
Implements CalDataSource. |