Data Types (RemObjects SDK)
(TODO: add Xcode types)
RemObjects SDK supports a variety of data types that are available when designing your service interface in Service Builder. Because RemObjects SDK supports different platforms, it uses common names to refer to these data types - which might not necessarily be the same as those used by your language of choice.
The Binary type is used to pass unstructured binary data between tiers in your application.
Used to send Boolean values of true or false. On .NET, this uses the System.Boolean type (bool in C#).
The Currency type is used to pass fixed-point decimal numbers between the tiers of your application.
For .NET, this maps to the System.Decimal type, but note that the streaming format for BinMessage uses a different binary representation for this type, equal to the OleAutomation and Delphi "Currency" type, which is basically a 64 bit integer shifted so that the 4 least significant digits represent decimals.
For Delphi, this maps to the language's "currency" type, which is a 64-bit fixed-point numerical type with 4 significant decimal points.
The "String" data type is used to represent strings of characters.
While on the .NET platform all strings map to System.String, the "String" data type will be serialized as 8-bit ANSI string (and might be represented as such on other platforms). The system's current ANSI code page will be used for encoding, so the actual encoding will be dependent on the system locale.
If you need to send strings while preserving the full 16 bit Unicode character set, define your services to use the WideString or Utf8String types discussed below. In general, Utf8String will be the best option for strings when using .NET on one or both sides of the communication.
In Delphi, this type maps directly to the 8-bit "string" language type.
The Utf8String data type is used to represent strings of characters. As a compromise between the plain "String" data type and WideStrings, Utf8Strings will be serialized as UTF-8 encoded 8 bit strings preserving any Unicode characters, while maintaining a smaller memory footprint than WideStrings.
In Delphi, the String and Utf8Strings data types will be handled identically, and mapped to the "string" language type. It is up to the application's code to treat received strings as UTF-8 encoded and use the RTL functions to convert them back from and to ANSI or WideString, where needed.
The variant type can be used to represent a field or parameter of unknown type and can hold different types of data at runtime.
Passing any other type of object into or out of a service method (whether as a parameter or nested inside a struct) will cause an InvalidVariantValueException at runtime.
For Delphi, this maps directly to the languages "Variant" type.
The WideString data type is used to represent strings of characters. In contrast to the "String" data type, WideStrings will be serialized as true 16 bit strings, preserving any Unicode characters. As a downside, they will consume twice as much space (in the uncompressed message) as normal String types.
Arrays can be defined in the Service Builder library in order to pass arrays of any other valid type between the tiers of your application. For .NET, arrays will be represented as standard system arrays (System.Array) just as if you defined them in code. the Service Builder only supports single-dimension arrays, although you can use "array of array of" nesting to create non-rectangular arrays.
In Delphi, custom class types are generated in the Intf unit to represent array types.
- Namespace Lists for .NET — Java
- Interface Lists for .NET — Delphi — Java
- Protocol Lists for Xcode
- Class Lists for .NET — Xcode — Delphi — Java
- Enum Lists for .NET — Xcode — Java
- Alias Lists for Xcode — Delphi
- Implements Lists for .NET — Xcode — Delphi — Java
- Data Types
- File Types