[omniORB] IDL Linked list

Martin Trappel 0xCDCDCDCD at gmx.at
Fri Apr 11 13:29:07 BST 2008


mov . wrote:
> Hi,
> 
> I've googled a fair amount, and found nothing on the mailing list about 
> this. How would I model a linked list in IDL? Could someone maybe point 
> me to some good IDL documentation for omniORB, if there is any. I've 
> looked at the C++ Language Mapping, Version 1.2 from OMG, but I haven't 
> found anything there either. What I want is something that's equivalent 
> to, and preferably also maps to,
> 
> typedef struct list_item_s {
>   int value;
>   struct list_item_s *next;
> } list_item_t;
> 
> Any ideas? Am I missing something obvious? Any help is appreciated.
> 
> /David
> 

IDL only defines an Interface, so it may not make sense to define a 
linked list in IDL. Of course, if you really like to model a linked list 
on the interface level, you could write something like:

module Example {
   interface ListItem;

   interface ListItem {
     int GetValue();
     ListItem Next();
   };
};

br,
Martin



More information about the omniORB-list mailing list