[orbitcpp-list] Re: TypeCode for ORBit-C++
Status: Beta
Brought to you by:
philipd
From: Sam C. <sa...@to...> - 2000-10-31 10:57:29
|
Phil Dawes <ph...@us...> wrote: > Not really - this is cool! (It compiled out of the box which made me > smile :-) Tee hee... It compiles, let's ship it! > Using the generated code is probably the simplist way to proceed for > now. Andreas used a macro to generate his sequences (check out > ORBITCPP_DECLARE_SIMPLE_SEQUENCE in orbitcpp_poa.h - you may want to > do something similar.) I found that macro today, and I'm trying to get things working right with it. It's way neater than the generated code, which makes me feel more comfortable. It also doesn't rely on the included generated C code from orbit-idl. > I don't think the stuff in orbitcpp_orb.hh is quite right: I didn't think it was either, but I also didn't know how to make it right. I thought I had it mostly worked out today, but... > TypeCode create_struct_tc(const char * id, const char * name, > StructMemberSeq members); >=20 > needs to be: >=20 > TypeCode_ptr create_struct_tc(const char * id, const char * name, > const StructMemberSeq & members);=20 [ ... ] > (Check out the table on page 104 of the CORBA C++ language mapping for > details of arguments and parameter passing rules). Heh. Check out page 56 of "The Common Object Request Broker: Architecture and Specifications" for an example of C++ code where the return types from create_recursive_tc() and create_value_tc() seem to be a TypeCode_var. I'll modify the prototypes to match what you've suggested, for two reasons: 1) It will match the C++ mapping correctly. 2) I can't get it to work using TypeCode_var return types anyway. :) --=20 Sam Couter | Internet Engineer | http://www.topic.com.au/ sa...@to... | tSA Consulting | PGP key available on key servers PGP key fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C |