#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). | |||||||
| char | mTmpArea [OGRE_STREAM_TEMP_SIZE] | ||||||
| Temporary buffer area used for formatted read. | |||||||
Definition at line 158 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 266 of file OgreDataStream.h. References Ogre::uchar. |
|
|
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 70 of file OgreDataStream.h. References Ogre::String. |
|
|
Get a pointer to the start of the memory block this stream holds.
Definition at line 263 of file OgreDataStream.h. References Ogre::uchar. |
|
||||||||||
|
|
|
||||||||||||
|
Implements Ogre::DataStream. |
|
||||||||||||||||
|
Implements Ogre::DataStream. |
|
|
Implements Ogre::DataStream. |
|
|
Sets whether or not to free the encapsulated memory on close.
Definition at line 300 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 138 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. |
|
|
Implements Ogre::DataStream. |
|
|
Implements Ogre::DataStream. |
|
|
Pointer to the start of the data area.
Definition at line 162 of file OgreDataStream.h. |
|
|
Pointer to the end of the memory.
Definition at line 166 of file OgreDataStream.h. |
|
|
Do we delete the memory on close.
Definition at line 168 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 58 of file OgreDataStream.h. |
|
|
Pointer to the current position in the memory.
Definition at line 164 of file OgreDataStream.h. |
|
|
Size of the data in the stream (may be 0 if size cannot be determined).
Definition at line 60 of file OgreDataStream.h. |
|
|
Temporary buffer area used for formatted read.
Definition at line 63 of file OgreDataStream.h. |
Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:36:32 2005