#include <OgreSDDataChunk.h>
Inheritance diagram for Ogre::SDDataChunk:
Public Methods | |
SDDataChunk () | |
SDDataChunk (void *pData, size_t size) | |
~SDDataChunk () | |
Overloaded destructor. More... | |
uchar * | allocate (size_t size, const uchar *ptr=NULL) |
Allocates the passed number of bytes. More... | |
DataChunk & | clear () |
Frees all internally allocated memory. More... | |
size_t | getSize () const |
Returns the size of the allocated chunk in bytes. More... | |
uchar * | getPtr () |
Returns a const pointer to the start of the memory. More... | |
const uchar * | getPtr () const |
Returns a const pointer to the start of the memory. More... | |
ulong | read (void *buffer, unsigned long size) |
Reads memory from the main buffer into another, incrementing an internal 'current' pointer to allow progressive reads. More... | |
DataChunk & | seek (size_t pos) |
Repositions the internal read pointer to a specified byte. More... | |
DataChunk & | skip (long offset) |
Moves the internal read pointer backwards or forwards by the number of bytes specified. More... | |
unsigned long | readUpTo (void *buffer, size_t size, const char *delim="\n") |
Reads data into the provided buffer until hitting the specified character or reaching the upper limit provided. More... | |
unsigned long | skipUpTo (const char *delim) |
Skips data into the provided buffer until hitting the specified character or reaching the end of the data. More... | |
bool | isEOF () |
Returns true if the buffer pointer has reached the end of the buffer. More... | |
String | getLine (bool trimAfter=true) |
Returns a String containing the next line of data, optionally trimmed for whitespace. More... | |
Protected Attributes | |
uchar * | mData |
uchar * | mPos |
uchar * | mEnd |
size_t | mSize |
This class contains all the functionality of the DataChunk superclass, only that when an object of this class gets deleted, it also deletes the allocated memory (SD stands for Self-Delete).
|
|
|
|
|
Overloaded destructor.
|
|
Allocates the passed number of bytes.
|
|
Frees all internally allocated memory.
|
|
Returns a String containing the next line of data, optionally trimmed for whitespace.
|
|
Returns a const pointer to the start of the memory.
|
|
Returns a const pointer to the start of the memory.
|
|
Returns the size of the allocated chunk in bytes.
|
|
Returns true if the buffer pointer has reached the end of the buffer.
|
|
Reads memory from the main buffer into another, incrementing an internal 'current' pointer to allow progressive reads.
|
|
Reads data into the provided buffer until hitting the specified character or reaching the upper limit provided.
|
|
Repositions the internal read pointer to a specified byte.
|
|
Moves the internal read pointer backwards or forwards by the number of bytes specified.
|
|
Skips data into the provided buffer until hitting the specified character or reaching the end of the data.
|
|
|
|
|
|
|
|
|
Copyright © 2002 by The OGRE Team