[omniORB] Recursive union IDL

Frederic Prin frederic.prin at silvaco.com
Fri Apr 23 18:59:14 BST 2004


Hi 

I'm trying a recursive union:

    typedef sequence<Link> LinkSeq ;

    union Link switch(long) {
    case 0: unsigned short ta;
    case 1: string tb;
    case 2: sequence<Link> sc;
    };
(from Advanced CORBA Programming with C++ book p 209)

Omniidl complain:
Warning: Anonymous sequences for recursive unions are deprecated. Use a
forward declaration instead.

But how do I forward declare sequence<Link>  ??

Off course adding a typedef doesn't work since the Link type is not yet
known


typedef sequence<Link> LinkSeq ;

    union Link switch(long) {
    case 0: unsigned short ta;
    case 1: string tb;
    case 2: sequence<Link> sc;
    };

Something escapes me

Thanks for hints and maybe a link to an uptodate IDL C++ mapping doc!

Fred

                              (
     Frédéric Prin          )
     Senior Software Engineer /
          S I L V A C O      (
     Grenoble REsearch CEnter \
     Tel 04 56 38 10 33        )
    __________________________/___
   /__/__/__/__/__/__/__/__/__/__/
  /__/__/__/__/__/__/__/__/_____/
 /__/__/__/__/__/__/__/__/__/__/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040423/4f877490/attachment.htm


More information about the omniORB-list mailing list