| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I have a number of quite large structs that share some fields (both simple and defined types). For now I have written a getter and a setter for each structure and there is like 30 of them. What would be a subtle way to pass any of these structs in a single function call. Defining a BIG struct with all the data would do the trick, but then there would be lots of unnecessary data in each call. Should I use a CORBA::Any instead or is there some better way by using sequences for each type or something like that? Cheers, --jarkko |
|
#2
| |||
| |||
| "Jarkko Marjeta" <yagge@jippii.fi> wrote in message news:<jtcbc.280$Hp6.175@read3.inet.fi>... > Hi, > I have a number of quite large structs that share some fields (both simple > and defined types). For now I have written a getter and a setter for each > structure and there is like 30 of them. What would be a subtle way to pass > any of these structs in a single function call. Defining a BIG struct with > all the data would do the trick, but then there would be lots of unnecessary > data in each call. Should I use a CORBA::Any instead or is there some better > way by using sequences for each type or something like that? You can also use valuetype. Regards, Ke > Cheers, > --jarkko |
|
#3
| |||
| |||
| "Ke Jin" <kejin@borland.com> wrote in message news:887a1f78.0404021745.4ce3da16@posting.google.c om... > "Jarkko Marjeta" <yagge@jippii.fi> wrote in message news:<jtcbc.280$Hp6.175@read3.inet.fi>... > > Hi, > > I have a number of quite large structs that share some fields (both simple > > and defined types). For now I have written a getter and a setter for each > > structure and there is like 30 of them. What would be a subtle way to pass > > any of these structs in a single function call. Defining a BIG struct with > > all the data would do the trick, but then there would be lots of unnecessary > > data in each call. Should I use a CORBA::Any instead or is there some better > > way by using sequences for each type or something like that? > > You can also use valuetype. Right, that will work too. But I don't think it would provide anything that unions wouldn't, and unions are much more efficient to marshal. Cheers, Michi. -- Michi Henning Ph: +61 4 1118-2700 ZeroC, Inc. http://www.zeroc.com |
|
#4
| |||
| |||
| "Michi Henning" <michi@triodia.com> wrote in message news:<6Vccc.670$x7.639@news-server.bigpond.net.au>... > "Ke Jin" <kejin@borland.com> wrote in message > news:887a1f78.0404021745.4ce3da16@posting.google.c om... > > "Jarkko Marjeta" <yagge@jippii.fi> wrote in message > news:<jtcbc.280$Hp6.175@read3.inet.fi>... > > > Hi, > > > I have a number of quite large structs that share some fields (both simple > > > and defined types). For now I have written a getter and a setter for each > > > structure and there is like 30 of them. What would be a subtle way to pass > > > any of these structs in a single function call. Defining a BIG struct with > > > all the data would do the trick, but then there would be lots of > unnecessary > > > data in each call. Should I use a CORBA::Any instead or is there some > better > > > way by using sequences for each type or something like that? > > > > You can also use valuetype. > > Right, that will work too. But I don't think it would provide anything that > unions > wouldn't, and unions are much more efficient to marshal. Yes, agree! I just randomly picked up something I feel better than pass IDL structures inside Any .However, with valuetype, it is strightforward to construct and pass a structure link list (especially a circulated link list). IDL union doesn't provide such capability. Also, with 30 or so structures to be IDL'ized, valuetypes allow them to be defined/maintained/extended independently. Cheers, Ke > > Cheers, > > Michi. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.