Complex Data Types

This next example won't do much as a practical application. However, it illustrates how to use some of the complex data types that are available in CORBA IDL. Listing 19.8 shows the IDL for the Advanced Data Types (ADTs).

Listing 19.8. ADT.idl
// ADT IDL file
//
// Demonstrates various data structures in IDL
//

// use an alias for string types

typedef string Identifier;

enum EnumType
{
  first,
  second,
  third
};

struct StructType
{
  short s;
  long l;
  Identifier i; }; const unsigned long ArraySize = 3; typedef StructType StructArray[ArraySize]; typedef sequence<StructType> StructSequence; interface ADT { void Test1(in Identifier st, in EnumType myEnum, inout StructType myStruct); void Test2(out StructType myStruct, in StructArray ...

Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.