Re: [Orbit-python-list] How to use IDL unions with orbit-python?
Status: Inactive
Brought to you by:
tack
|
From: Duncan G. <dg...@uk...> - 2002-01-29 11:57:56
|
On Saturday 26 January, ml wrote:
> I should have written, that I already read the spec, and
> also found some examples both for orbit-python and
> omniORBpy, but no document showed the use of "embedded"
> enum values e.g. in a union:
>
> module M {
> union U switch (enum E { A, B }) {
> case A: ...;
> case B: ...;
> };
> };
The enum is in the scope of the union, so you should be able to do
u = M.U(M.A, foo)
where foo is the right type for case A.
I believe ORBit-Python fails to cope with the nested enum. See my
mailing list posting:
http://sourceforge.net/mailarchive/forum.php?thread_id=213405&forum_id=4733
> So it's more a problem with enums than with unions,
> because here I have the same problem:
>
> module M {
> struct S {
> enum E { A, B } X;
> };
> };
Here, the enum is in the scope of S, so you should be able to do
s = M.S(M.S.B)
Again, it seems to be broken with ORBit-Python.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --
|