csFileReadHelper Class Reference
Convenience class for simple file element reading. More...
#include <csutil/filereadhelper.h>
Public Member Functions | |
| csFileReadHelper (iFile *file) | |
| Initialize reader. | |
| iFile * | GetFile () |
| Get the wrapped file. | |
| void | Skip (size_t num) |
| Skip a given amount of bytes. | |
Character reading | |
| int | GetChar () |
| Read a single character. Returns EOF if the stream has finished. | |
| int | LookChar () |
| Return the next character (or EOF), but don't move forward. | |
String reading | |
| bool | GetString (char *buf, size_t len, bool OmitNewline=true) |
| Read a line of text. | |
| float | ReadTextFloat () |
| Read a floating-point value from the stream that is stored as ASCII. | |
| int | ReadTextInt () |
| Read an integer value from the stream that is stored as ASCII. | |
| void | SkipWhitespace () |
| Skip any whitespace characters. | |
Sized type reading | |
| |
| bool | ReadInt16 (int16 &val) |
| bool | ReadInt32 (int32 &val) |
| bool | ReadInt8 (int8 &val) |
| Read a specifically sized data value from the file. | |
| bool | ReadUInt16 (uint16 &val) |
| bool | ReadUInt32 (uint32 &val) |
| bool | ReadUInt8 (uint8 &val) |
Detailed Description
Convenience class for simple file element reading.
Definition at line 35 of file filereadhelper.h.
Constructor & Destructor Documentation
|
|
Initialize reader.
Definition at line 43 of file filereadhelper.h. |
Member Function Documentation
|
|
Read a single character. Returns EOF if the stream has finished.
|
|
|
Get the wrapped file.
Definition at line 46 of file filereadhelper.h. |
|
||||||||||||||||
|
Read a line of text. Returns false if the stream has finished. If 'OmitNewline' is true then the newline character will be thrown away. |
|
|
Return the next character (or EOF), but don't move forward.
|
|
|
Read a specifically sized data value from the file.
|
|
|
Read a floating-point value from the stream that is stored as ASCII.
|
|
|
Read an integer value from the stream that is stored as ASCII.
|
|
|
Skip a given amount of bytes.
Definition at line 49 of file filereadhelper.h. References iFile::SetPos(). |
|
|
Skip any whitespace characters.
|
The documentation for this class was generated from the following file:
- csutil/filereadhelper.h
Generated for Crystal Space by doxygen 1.4.6
