[omniORB] Lists in omniORB 3?

Duncan Grisby dgrisby@uk.research.att.com
Mon, 02 Jul 2001 10:05:12 +0100


On Monday 2 July, "Jonas Reimers" wrote:

> In my IDL I tries to write as follows:

There are lots of problems with this, but I suspect most of them are
just in what you wrote here. Anyway...

> interface{

You have to give a name to the interface

  interface Foo {

> struct object{

You can't call your struct "object", since "Object" is a keyword.
Let's call it my_struct. (Not my_object, since that leads to confusion
with interfaces.)

struct my_struct {

>      char  a[30];
>      long b;
> }

>      typedef object object_type;

This line doesn't gain you anything, but changing the names, it's OK:

  typedef my_struct my_struct_type;

>      long object_list(in long index, in object_type list[50]);

You can't have anonymous arrays in operation parameters. You should do

  typedef my_struct my_struct_list[50];

  long object_list(in long index, in my_struct_list list);


Depending of what you are trying to do, it's quite possible that you
would be better off using a sequence rather than an array, since
sequences can vary in length.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --