Discussion:
[omniORB] Sequence type in IDL of omniORB
janarbek
2007-09-18 14:24:53 UTC
Permalink
Dear all,

Does IDL suppor array? I failed in generating stubs in following IDL. How can I use array in IDL?

interface shortTest{

short[] returnShort();
};

Regards,

Janarbek.

And does the synatax of IDL of omniORB is same with CORBA IDL?


---------------------------------
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070918/1d0be24e/attachment.htm
Alex Tingle
2007-09-18 15:35:52 UTC
Permalink
Post by janarbek
And does the synatax of IDL of omniORB is same with CORBA IDL?
Yes, omniORB is an implementation of CORBA, so omniORB IDL is the same
as CORBA IDL.
Post by janarbek
How can I use array in IDL?
It's well documented. Why not look it up?

-Alex
William Bauder
2007-09-18 19:37:04 UTC
Permalink
Use sequence<type> for arrays. You'll need to typedef it for the
method, i.e.:

typedef sequence<short> shortarrary;
....
shortarray returnShort();

-----Original Message-----
From: omniorb-list-***@omniorb-support.com
[mailto:omniorb-list-***@omniorb-support.com] On Behalf Of janarbek
Sent: Tuesday, September 18, 2007 4:25 AM
To: omniORB-***@omniorb-support.com
Subject: [omniORB] Sequence type in IDL of omniORB


Dear all,

Does IDL suppor array? I failed in generating stubs in following IDL.
How can I use array in IDL?

interface shortTest{

short[] returnShort();
};

Regards,

Janarbek.

And does the synatax of IDL of omniORB is same with CORBA IDL?



_____

Fussy? Opinionated? Impossible to please? Perfect. Join
<http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yaho
o_panel_invite.asp?a=7> Yahoo!'s user panel and lay it on us.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070918/18453e0a/attachment.htm
Piet van Oostrum
2007-09-19 14:27:05 UTC
Permalink
J> Dear all,
J> Does IDL suppor array? I failed in generating stubs in following IDL. How can I use array in IDL?
J> interface shortTest{
J> short[] returnShort();
J> };
There are two errors in your IDL:
1. Arrays have fixed bounds, so you have to supply the size of the array
between []. Otherwise you must use a sequence.
2. In an operation (method) declaration you can't use a complex type like
an array, sequence or struct. You must give them a name with typedef.

interface shortTest{
typedef short shortarray[10];
shortarray returnShort();
};
--
Piet van Oostrum <***@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: ***@vanoostrum.org
Loading...