[omniORB] Re: GIOP protocol error

Sean Parker supinlick at yahoo.com
Fri Aug 3 07:41:37 BST 2007


> 
> One thing I did fix in this new version was changing one
> of
> my struct contents from numbers-plus-string to all
> numbers
> (a Date type) which is likely passed in this data. (

I meant to add [before the 'send' button interrupted me
:-)]:

related to message: '[omniORB] fixed-length structs'
responded by Fischer, Clemens, response to my previous
issue follows:

"Hi [Sean],

the difference in fixed-length and variable-length structs
 is that the former ones are returned by value, not by
 pointer. Yet another of the thousand pitfalls in the IDL
to C++
 mapping.

In case your get() method is an implemetatation of a CORBA
 interface method, the correct signature would be DateTime
 get( <stuff> ). It's also not necessary to create a
DateTime
 instance on the heap. You can simply do it like this:

  DateTime get( <stuff> )
  {
    DateTime ret;
    ret.year = 2007;
    ...
    ret.seconds = 0;
    return ret;
  }

So you don't need the _var type at all. I guess it's only
 there for symmetry and in case you later want to make the
 struct variable-length without changing your code.

If you take a look at _CORBA_ConstrType_Fix_Var, you'll
 notice that it handles its content by value instead of
pointer
 and immediately deletes the value passed as pointer to its
 contructor.

Kind Regards
Clemens Fischer
"




God Bless 
    Sean Parker 





       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222



More information about the omniORB-list mailing list