#include <InStreams.h>
Inheritance diagram for InText:
Public Member Functions | |
InText () | |
Default constructor. | |
void | reset () |
Resets theChar to be able to use the same instance of InText or InConfig more than once. | |
Protected Member Functions | |
virtual bool | isEof (const PhysicalInStream &stream) const |
The function returns whether the end of stream has been reached. | |
virtual void | readChar (char &d, PhysicalInStream &stream) |
reads a character from a stream | |
virtual void | readUChar (unsigned char &d, PhysicalInStream &stream) |
reads a unsigned character from a stream | |
virtual void | readShort (short &d, PhysicalInStream &stream) |
reads a short from a stream | |
virtual void | readUShort (unsigned short &d, PhysicalInStream &stream) |
reads a unsigned short from a stream | |
virtual void | readInt (int &d, PhysicalInStream &stream) |
reads a int from a stream | |
virtual void | readUInt (unsigned int &d, PhysicalInStream &stream) |
reads a unsigned int from a stream | |
virtual void | readLong (long &d, PhysicalInStream &stream) |
reads a long from a stream | |
virtual void | readULong (unsigned long &d, PhysicalInStream &stream) |
reads a unsigned long from a stream | |
virtual void | readFloat (float &d, PhysicalInStream &stream) |
reads a float from a stream | |
virtual void | readDouble (double &d, PhysicalInStream &stream) |
reads a double from a stream | |
virtual void | readString (char *d, PhysicalInStream &stream) |
The function reads a string from a stream. | |
virtual void | readEndl (PhysicalInStream &stream) |
reads the 'end of line' from a stream | |
virtual bool | isWhitespace () |
The function determines whether the current character is a whitespace. | |
virtual void | skipWhitespace (PhysicalInStream &stream) |
The function skips the whitespace. | |
virtual void | nextChar (PhysicalInStream &stream) |
The function reads the next character from the stream. | |
virtual void | readData (void *p, int size, PhysicalInStream &stream) |
The function reads a number of bytes from the file. | |
Protected Attributes | |
char | theChar |
The last character read. | |
Private Attributes | |
char | buf [200] |
A buffer to convert read strings. | |
bool | eof |
The physical reading is done by PhysicalInStream derivates.
Definition at line 286 of file InStreams.h.
|
Default constructor.
Definition at line 294 of file InStreams.h. References reset(). |
Here is the call graph for this function:
|
Resets theChar to be able to use the same instance of InText or InConfig more than once.
Definition at line 299 of file InStreams.h. Referenced by MessageQueue::handleAllMessages(), MessageQueue::handleSpecificMessages(), InText(), and InMessage::resetReadPosition(). |
|
The function returns whether the end of stream has been reached. If this function returns false, "theChar" is valid, otherwise it is not.
Implements StreamReader. Definition at line 313 of file InStreams.h. References eof. Referenced by InConfig::create(), InConfig::nextChar(), readString(), InConfig::skipComment(), InConfig::skipLine(), InConfig::skipWhitespace(), and skipWhitespace(). |
|
reads a character from a stream
Implements StreamReader. Definition at line 320 of file InStreams.h. References readString(). Referenced by readData(). |
Here is the call graph for this function:
|
reads a unsigned character from a stream
Implements StreamReader. Definition at line 328 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a short from a stream
Implements StreamReader. Definition at line 336 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a unsigned short from a stream
Implements StreamReader. Definition at line 344 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a int from a stream
Implements StreamReader. Definition at line 352 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a unsigned int from a stream
Implements StreamReader. Definition at line 361 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a long from a stream
Implements StreamReader. Definition at line 369 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a unsigned long from a stream
Implements StreamReader. Definition at line 377 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a float from a stream
Implements StreamReader. Definition at line 385 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
reads a double from a stream
Implements StreamReader. Definition at line 393 of file InStreams.h. References readString(). |
Here is the call graph for this function:
|
The function reads a string from a stream. It skips all whitespace characters, and then reads a sequence of non-whitespace characters to a buffer, until it again recognizes a whitespace.
Implements StreamReader. Definition at line 30 of file InStreams.cpp. References isEof(), isWhitespace(), nextChar(), skipWhitespace(), and theChar. Referenced by InConfig::create(), readChar(), readDouble(), readFloat(), readInt(), readLong(), readShort(), readUChar(), readUInt(), readULong(), and readUShort(). |
Here is the call graph for this function:
|
reads the 'end of line' from a stream
Implements StreamReader. Definition at line 412 of file InStreams.h. |
|
The function determines whether the current character is a whitespace.
Reimplemented in InConfig. Definition at line 51 of file InStreams.cpp. References theChar. Referenced by InConfig::isWhitespace(), readString(), InConfig::skipWhitespace(), and skipWhitespace(). |
|
The function skips the whitespace.
Reimplemented in InConfig. Definition at line 56 of file InStreams.cpp. References isEof(), isWhitespace(), and nextChar(). Referenced by readString(). |
Here is the call graph for this function:
|
The function reads the next character from the stream.
Reimplemented in InConfig. Definition at line 427 of file InStreams.h. References eof, PhysicalInStream::getEof(), PhysicalInStream::readFromStream(), and theChar. Referenced by InConfig::nextChar(), InTextMessage::readAll(), readString(), and skipWhitespace(). |
Here is the call graph for this function:
|
The function reads a number of bytes from the file.
Implements StreamReader. Definition at line 45 of file InStreams.cpp. References readChar(). |
Here is the call graph for this function:
|
A buffer to convert read strings.
Definition at line 289 of file InStreams.h. |
|
Definition at line 290 of file InStreams.h. Referenced by isEof(), nextChar(), and reset(). |
|
The last character read.
Definition at line 305 of file InStreams.h. Referenced by isWhitespace(), nextChar(), readString(), and reset(). |