#include <OgreDataStream.h>
Inheritance diagram for Ogre::DataStream:
Public Member Functions | |
DataStream () | |
Constructor for creating unnamed streams. | |
DataStream (const String &name) | |
Constructor for creating named streams. | |
const String & | getName (void) |
Returns the name of the stream, if it has one. | |
virtual | ~DataStream () |
template<typename T> DataStream & | operator>> (T &val) |
virtual size_t | read (void *buf, size_t count)=0 |
Read the requisite number of bytes from the stream, stopping at the end of the file. | |
virtual size_t | readLine (char *buf, size_t maxCount, const String &delim="\n")=0 |
Get a single line from the stream. | |
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. | |
virtual size_t | skipLine (const String &delim="\n")=0 |
Skip a single line from the stream. | |
virtual void | skip (long count)=0 |
Skip a defined number of bytes. | |
virtual void | seek (size_t pos)=0 |
Repositions the read point to a specified byte. | |
virtual size_t | tell (void) const=0 |
Returns the current byte offset from beginning. | |
virtual bool | eof (void) const=0 |
Returns true if the stream has reached the end. | |
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. | |
virtual void | close (void)=0 |
Close the stream; this makes further operations invalid. | |
Protected Attributes | |
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 54 of file OgreDataStream.h.
|
Constructor for creating unnamed streams.
Definition at line 66 of file OgreDataStream.h. |
|
Constructor for creating named streams.
Definition at line 68 of file OgreDataStream.h. References Ogre::String. |
|
Definition at line 71 of file OgreDataStream.h. |
|
Close the stream; this makes further operations invalid.
Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
Returns true if the stream has reached the end.
Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
Returns a String containing the entire stream.
|
|
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. |
|
|
|
Read the requisite number of bytes from the stream, stopping at the end of the file.
Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
Get a single line from the stream.
Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
Repositions the read point to a specified byte.
Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
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. |
|
Skip a defined number of bytes. This can also be a negative value, in which case the file pointer rewinds a defined number of bytes. Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
Skip a single line from the stream.
Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
Returns the current byte offset from beginning.
Implemented in Ogre::MemoryDataStream, Ogre::FileStreamDataStream, Ogre::FileHandleDataStream, and Ogre::ZipDataStream. |
|
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. |
|
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
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:38:38 2006