#include <rtdelphi.h>
Inheritance diagram for lrt::DelphiDataInputStream:

Public Methods | |
| DelphiDataInputStream (InputStream *in) | |
| Creates a Delphi binary input stream which reads from another input stream. More... | |
| DelphiDataInputStream (const String &filename) | |
| Creates a Delphi binary input stream which reads from a file (given by its name). More... | |
| virtual | ~DelphiDataInputStream () |
| Variant | readAny () |
| Reads the next contained element from the file. More... | |
| String | readString () |
| Reads a String from the file. More... | |
| int | readInt () |
| Reads an integer from the file. More... | |
| double | readDouble () |
| Reads a floating-point number from the file. More... | |
The advantage of the Delphi binary file format is that it has prefixes which indicate the type of the next data structure in the file, so that even if you don't know what's in the file, you can still properly parse it.
Even though the original Delphi format is Intel-centric, with little-endian data format, this library should work on any platform.
|
|
Creates a Delphi binary input stream which reads from another input stream. Note: When this input stream is deleted, the other one is deleted as well. |
|
|
Creates a Delphi binary input stream which reads from a file (given by its name). This is a convenience constructor which ensures that the file is opened in binary mode. |
|
|
Reads the next contained element from the file. If the next data in the file is not a known element, exits the app. |
|
|
Reads a floating-point number from the file.
Note: If the next data in the file is not a Delphi floating-point, exits the app. |
|
|
Reads an integer from the file.
Note: If the next data in the file is not a Delphi integer, exits the app. |
|
|
Reads a String from the file.
Note: If the next data in the file is not a Delphi string, exits the app. |