|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| StreamObject () | |
| StreamObject (Stream *stream) | |
| virtual | ~StreamObject () |
| DECLARE_CONOBJECT (StreamObject) | |
| virtual bool | onAdd () |
| Called when the object is added to the sim. | |
| void | setStream (Stream *stream) |
| Set the stream to allow reuse of the object. | |
| Stream * | getStream () |
| Get the underlying stream. Used with setStream() to support object reuse. | |
| const char * | getStatus () |
| Gets a printable string form of the status. | |
| bool | isEOS () |
| U32 | getPosition () const |
| Gets the position in the stream. | |
| bool | setPosition (const U32 in_newPosition) |
| Sets the position of the stream. Returns if the new position is valid or not. | |
| U32 | getStreamSize () |
| Gets the size of the stream. | |
| const char * | readLine () |
| Reads a line from the stream. | |
| void | writeLine (U8 *buffer) |
| Writes a line to the stream. | |
| const char * | readSTString (bool casesens=false) |
| Reads a string and inserts it into the StringTable. | |
| const char * | readString () |
| Reads a string of maximum 255 characters long. | |
| const char * | readLongString (U32 maxStringLen) |
| Reads a string that could potentially be more than 255 characters long. | |
| void | writeLongString (U32 maxStringLen, const char *string) |
| Writes a string to the stream. | |
| void | writeString (const char *stringBuf, S32 maxLen=255) |
| Writes a string to the stream. | |
| bool | copyFrom (StreamObject *other) |
| Copy the contents of another stream into this one. | |
Protected Attributes | |
| Stream * | mStream |
Private Types | |
| typedef SimObject | Parent |
typedef SimObject StreamObject::Parent [private] |
| StreamObject::StreamObject | ( | ) |
| StreamObject::StreamObject | ( | Stream * | stream | ) |
| virtual StreamObject::~StreamObject | ( | ) | [virtual] |
| StreamObject::DECLARE_CONOBJECT | ( | StreamObject | ) |
| virtual bool StreamObject::onAdd | ( | ) | [virtual] |
Called when the object is added to the sim.
Reimplemented from SimObject.
Reimplemented in FileStreamObject.
Set the stream to allow reuse of the object.
| Stream* StreamObject::getStream | ( | ) | [inline] |
Get the underlying stream. Used with setStream() to support object reuse.
| const char* StreamObject::getStatus | ( | ) |
Gets a printable string form of the status.
| bool StreamObject::isEOS | ( | ) | [inline] |
| U32 StreamObject::getPosition | ( | ) | const [inline] |
Gets the position in the stream.
Sets the position of the stream. Returns if the new position is valid or not.
| U32 StreamObject::getStreamSize | ( | ) | [inline] |
Gets the size of the stream.
| const char* StreamObject::readLine | ( | ) |
Reads a line from the stream.
| const char* StreamObject::readSTString | ( | bool | casesens = false |
) | [inline] |
| const char* StreamObject::readString | ( | ) |
Reads a string of maximum 255 characters long.
| const char* StreamObject::readLongString | ( | U32 | maxStringLen | ) |
Reads a string that could potentially be more than 255 characters long.
| maxStringLen | Maximum length to read. If the string is longer than maxStringLen, only maxStringLen bytes will be read. | |
| stringBuf | buffer where data is read into |
Writes a string to the stream.
This function is slightly unstable. Only use this if you have a valid string that is not empty. writeString is safer.
Writes a string to the stream.
| bool StreamObject::copyFrom | ( | StreamObject * | other | ) | [inline] |
Copy the contents of another stream into this one.
Stream* StreamObject::mStream [protected] |