#include <loader.h>
Nevrax France
Definition at line 49 of file loader.h.
Public Member Functions | |
bool | fillBuffer () |
Fills the buffer entirely. | |
bool | fillBufferPart (uint32 size) |
virtual uint32 | getSize ()=0 |
Return the size of the data to load (or MAXINT32 if unknown). | |
ILoader () | |
Constructor. | |
virtual void | setBuffer (IBuffer *buffer) |
Set the destination buffer. | |
virtual | ~ILoader () |
Destructor. | |
Protected Member Functions | |
virtual void * | provideData (uint32 size)=0 |
Provide data (load). | |
Protected Attributes | |
IBuffer * | _Buffer |
|
Constructor.
Definition at line 69 of file loader.h.
00069 : _Buffer(NULL) {} |
|
Destructor.
Definition at line 72 of file loader.h.
00072 { _Buffer = NULL; } |
|
Fills the buffer entirely.
Definition at line 66 of file loader.cpp. References NLSOUND::IBuffer::fillBuffer(), getSize(), nlassert, provideData(), size, and uint32.
|
|
Fill the buffer up to the specified size, calling fillMore() if the buffer supports it, otherwise, fills the buffer entirely, calling IBuffer::fillBuffer() Definition at line 48 of file loader.cpp. References NLSOUND::IBuffer::fillBuffer(), NLSOUND::IBuffer::fillMore(), NLSOUND::IBuffer::getSize(), getSize(), NLSOUND::IBuffer::isFillMoreSupported(), nlassert, provideData(), size, and uint32.
00049 { 00050 nlassert( (_Buffer != NULL) && (size<=getSize()) ); 00051 if ( _Buffer->isFillMoreSupported() ) 00052 { 00053 nlassert( _Buffer->getSize() != 0 ); 00054 return _Buffer->fillMore( provideData( size ), size ); 00055 } 00056 else 00057 { 00058 return _Buffer->fillBuffer( provideData( size), size ); 00059 } 00060 } |
|
Return the size of the data to load (or MAXINT32 if unknown).
Referenced by fillBuffer(), and fillBufferPart(). |
|
Provide data (load).
Referenced by fillBuffer(), and fillBufferPart(). |
|
Set the destination buffer.
Definition at line 37 of file loader.cpp. References buffer, and nlassert.
|
|
|