Hello everyone,

I write a CORBA-aware BASIC language and I have a problem with
"any"-extraction:
Since the variables of my BASIC have dynamic type assignment they're
mapped to a CORBA-any.
Now when I try to convert an any (e.g. from a method call) to my
variable object, I use the following code:

Bas_Variable   Bas_IdlWrapperType::CorbaAnyToVariable(CORBA::Any *any_ptr)
{
    Bas_Variable var;

    CORBA::TypeCode_var tcode = any_ptr->type(); // get any's type

    if(tcode->unalias()->kind() == CORBA::tk_any) // ****
    {
      *(any_ptr) >>= ((const CORBA::Any *)any_ptr);
      var = CorbaAnyToVariable(any_ptr);
    }

    if(tcode->unalias()->kind() == CORBA::tk_char) // Do the same with
tk_XXX
    {
       ....
    }

     return var;
}

The if-block at **** should start a recursive extraction that finally
yields the typed content of "any". Unfortunately, this recursion never
stops. The really strange thing is that this code has already worked; I
have no explanation for that. Who can help me?

Thanks, Markus Finck

P.S. I am using Mico 2.3.11 on Suse Linux 9.3, gcc is 3.3.5 (Suse
standard compiler)
        If anyone is interested in this BASIC, it is GPL'ed on
www.vug.uni-duisburg.de/~markus/cobasic_en.html

_______________________________________________
Mico-devel mailing list
[email protected]
http://www.mico.org/mailman/listinfo/mico-devel

Reply via email to