#include <OgreDataStream.h>
Inheritance diagram for Ogre::MemoryDataStream:
Public Member Functions | ||||||||||
MemoryDataStream (void *pMem, size_t size, bool freeOnClose=false) | ||||||||||
Wrap an existing memory chunk in a stream. | ||||||||||
MemoryDataStream (const String &name, void *pMem, size_t size, bool freeOnClose=false) | ||||||||||
Wrap an existing memory chunk in a named stream. | ||||||||||
MemoryDataStream (DataStream &sourceStream, bool freeOnClose=true) | ||||||||||
Create a stream which pre-buffers the contents of another stream. | ||||||||||
MemoryDataStream (DataStreamPtr &sourceStream, bool freeOnClose=true) | ||||||||||
Create a stream which pre-buffers the contents of another stream. | ||||||||||
MemoryDataStream (const String &name, DataStream &sourceStream, bool freeOnClose=true) | ||||||||||
Create a named stream which pre-buffers the contents of another stream. | ||||||||||
MemoryDataStream (const String &name, const DataStreamPtr &sourceStream, bool freeOnClose=true) | ||||||||||
Create a named stream which pre-buffers the contents of another stream. | ||||||||||
MemoryDataStream (size_t size, bool freeOnClose=true) | ||||||||||
Create a stream with a brand new empty memory chunk. | ||||||||||
MemoryDataStream (const String &name, size_t size, bool freeOnClose=true) | ||||||||||
Create a named stream with a brand new empty memory chunk. | ||||||||||
~MemoryDataStream () | ||||||||||
uchar * | getPtr (void) | |||||||||
Get a pointer to the start of the memory block this stream holds. | ||||||||||
uchar * | getCurrentPtr (void) | |||||||||
Get a pointer to the current position in the memory block this stream holds. | ||||||||||
size_t | read (void *buf, size_t count) | |||||||||
| ||||||||||
size_t | readLine (char *buf, size_t maxCount, const String &delim="\n") | |||||||||
| ||||||||||
size_t | skipLine (const String &delim="\n") | |||||||||
| ||||||||||
void | skip (long count) | |||||||||
This can also be a negative value, in which case the file pointer rewinds a defined number of bytes. | ||||||||||
void | seek (size_t pos) | |||||||||
| ||||||||||
size_t | tell (void) const | |||||||||
| ||||||||||
bool | eof (void) const | |||||||||
| ||||||||||
void | close (void) | |||||||||
| ||||||||||
void | setFreeOnClose (bool free) | |||||||||
Sets whether or not to free the encapsulated memory on close. | ||||||||||
const String & | getName (void) | |||||||||
Returns the name of the stream, if it has one. | ||||||||||
template<typename T> | ||||||||||
DataStream & | operator>> (T &val) | |||||||||
virtual String | getLine (bool trimAfter=true) | |||||||||
Returns a String containing the next line of data, optionally trimmed for whitespace. | ||||||||||
virtual String | getAsString (void) | |||||||||
Returns a String containing the entire stream. | ||||||||||
size_t | size (void) const | |||||||||
Returns the total size of the data to be read from the stream, or 0 if this is indeterminate for this stream. | ||||||||||
Protected Attributes | ||||||||||
uchar * | mData | |||||||||
Pointer to the start of the data area. | ||||||||||
uchar * | mPos | |||||||||
Pointer to the current position in the memory. | ||||||||||
uchar * | mEnd | |||||||||
Pointer to the end of the memory. | ||||||||||
bool | mFreeOnClose | |||||||||
Do we delete the memory on close. | ||||||||||
String | mName | |||||||||
The name (e.g. resource name) that can be used to identify the source fot his data (optional). | ||||||||||
size_t | mSize | |||||||||
Size of the data in the stream (may be 0 if size cannot be determined). |
Definition at line 169 of file OgreDataStream.h.
|
Wrap an existing memory chunk in a stream.
|
|
Wrap an existing memory chunk in a named stream.
|
|
Create a stream which pre-buffers the contents of another stream.
|
|
Create a stream which pre-buffers the contents of another stream.
|
|
Create a named stream which pre-buffers the contents of another stream.
|
|
Create a named stream which pre-buffers the contents of another stream.
|
|
Create a stream with a brand new empty memory chunk.
|
|
Create a named stream with a brand new empty memory chunk.
|
|
|
|
Implements Ogre::DataStream. |
|
Implements Ogre::DataStream. |
|
Returns a String containing the entire stream.
|
|
Get a pointer to the current position in the memory block this stream holds.
Definition at line 277 of file OgreDataStream.h. |
|
Returns a String containing the next line of data, optionally trimmed for whitespace.
|
|
Returns the name of the stream, if it has one.
Definition at line 72 of file OgreDataStream.h. |
|
Get a pointer to the start of the memory block this stream holds.
Definition at line 274 of file OgreDataStream.h. |
|
|
|
Implements Ogre::DataStream. |
|
Reimplemented from Ogre::DataStream. |
|
Implements Ogre::DataStream. |
|
Sets whether or not to free the encapsulated memory on close.
Definition at line 311 of file OgreDataStream.h. |
|
Returns the total size of the data to be read from the stream, or 0 if this is indeterminate for this stream.
Definition at line 149 of file OgreDataStream.h. |
|
This can also be a negative value, in which case the file pointer rewinds a defined number of bytes.
Implements Ogre::DataStream. |
|
Reimplemented from Ogre::DataStream. |
|
Implements Ogre::DataStream. |
|
Pointer to the start of the data area.
Definition at line 173 of file OgreDataStream.h. |
|
Pointer to the end of the memory.
Definition at line 177 of file OgreDataStream.h. |
|
Do we delete the memory on close.
Definition at line 179 of file OgreDataStream.h. |
|
The name (e.g. resource name) that can be used to identify the source fot his data (optional).
Definition at line 62 of file OgreDataStream.h. |
|
Pointer to the current position in the memory.
Definition at line 175 of file OgreDataStream.h. |
|
Size of the data in the stream (may be 0 if size cannot be determined).
Definition at line 64 of file OgreDataStream.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Mon Aug 20 13:51:29 2007