Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lrt::DelphiDataOutputStream Class Reference

Supports writing binary files in the Delphi format. More...

#include <rtdelphi.h>

Inheritance diagram for lrt::DelphiDataOutputStream:

Inheritance graph
[legend]
List of all members.

Public Methods

 DelphiDataOutputStream (OutputStream *out)
 Creates a Delphi binary output stream which writes to another input stream. More...

bool writeAny (const Variant &)
 Writes another element to the stream.

bool writeString (const String &)
 Writes a String to the stream. More...

bool writeInt (int)
 Writes an integer to the stream. More...

bool writeDouble (double)
 Writes a double to the stream.


Detailed Description

Supports writing binary files in the Delphi format.

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.


Constructor & Destructor Documentation

lrt::DelphiDataOutputStream::DelphiDataOutputStream (  OutputStream *    out ) 
 

Creates a Delphi binary output stream which writes to another input stream.

Note: When this output stream is deleted, the other one is deleted as well.


Member Function Documentation

bool lrt::DelphiDataOutputStream::writeInt (  int    ) 
 

Writes an integer to the stream.

Note: This implementation uses the 8-bit, 16-bit and 32-bit integer formats, and always writes the smallest one which can hold the given number.

bool lrt::DelphiDataOutputStream::writeString (  const String &    ) 
 

Writes a String to the stream.

Note: This implementation uses the short (0x06) and long (0x0C) strings.


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer