C++ Structure or Class Support

JADE does not provide a facility to define structured record types with explicitly named members, although many external functions take such structures as parameters.

To provide a mapping to structured parameter types, you can define a fixed-length Binary primitive type in the function signature, where the binary length matches the size of the structure.

It is your responsibility to manually access fields within the Binary structure. For example, the GetTimeZoneInformation WIN32 Application Programming Interface (API) returns information in a TIME_ZONE_INFORMATION structure and takes a pointer to this structure as a parameter. If the size and layout of the structure are known, you can define a binary of the correct fixed-length in the signature.

You can then use the bracket ([]) substring operator on the binary to obtain the contents of individual structure fields and use type casting to convert them to an appropriate primitive type.

You can use the bufferAddress method of the String or Binary primitive type to determine the actual memory address if the structure needs to contain a pointer to another structure. For details, see "String Type" or "Binary Type", in Chapter 1 of the JADE Encyclopaedia of Primitive Types.