Re: [orbitcpp-list] Re: orbitcpp-list digest, Vol 1 #177 - 1 msg
Status: Beta
Brought to you by:
philipd
From: <MHL...@t-...> - 2001-03-12 09:58:05
|
Hi all! Since I didn't get a response to my last mail, here is my second try: The attached patch just inserts one line into file pass_xlate.cc that causes the any inserters and hmhm (language problem: hmhm=opposite of inserter :-)) for structs and interfaces to be placed in the namespace of the module. This was the case in orbitcpp 0.29 and I suppose this is correct. Putting them into the global namespace as orbitcpp 0.30 does at the moment, seems totally unlogical for my compiler and me. Unfortunately I have no idea where to look up the specs quick and what the specs say about my problem. Again please anybody who knows: please check the patch first. Have fun, Martin. On Don, 08 Mär 2001 11:50:47 Martin Schulze wrote: > On Don, 08 Mär 2001 00:09:39 John Luebs wrote: > > > > > Message: 1 > > > Date: Wed, 7 Mar 2001 14:23:46 +0100 > > > From: MHL...@t-... (Martin Schulze) > > > To: orb...@li... > > > Subject: Re: [orbitcpp-list] support for sequence<any> broken in > > orbitcpp-0.30 > > > Reply-To: orb...@li... > > [...] > > > inline void operator<<=(CORBA::Any& the_any, ::CorbaSigC::Slot_ptr* > > val) { > > > the_any.insert_simple( (CORBA::TypeCode_ptr)&::_orbitcpp::c::TC_CorbaSigC_Slot_struct, > > > val, CORBA_FALSE); > > > } > > > > > > inline void operator<<=(CORBA::Any& the_any, ::CorbaSigC::Slot_ptr > val) > > { > > > the_any.insert_simple( (CORBA::TypeCode_ptr)&::_orbitcpp::c::TC_CorbaSigC_Slot_struct, > > > &val); > > > } > > > > > > inline CORBA::Boolean operator>>=(const CORBA::Any& the_any, > > > ::CorbaSigC::Slot_ptr& val) { > > > return the_any.extract( (CORBA::TypeCode_ptr)&::_orbitcpp::c::TC_CorbaSigC_Slot_struct, > > > val); > > > } > > > [...] > > > I attached a simple patch for orbitcpp-0.30 that lets > > > orbitcpp create the latter code. Please check whether it's > > > okay and if so feel free to commit to cvs. > > > > > > Cu, > > > > > > Martin. > > > > > > > Hey everybody. > > About a month ago I took a job with Handheld Products, A Welch Allyn > > Affiliate so with that and personal issues I have been unable to do > > anything with orbitcpp :-(. > > Anyway, I believe the code as it stands is correct. Referring to page > > 1-52 to 1-54 of the CORBA C++ spec, there must be a copying and a > > non-copying form of inserter. The non-copying form means that the Any > > assumes ownership of the object reference, or structure, and the caller > > of the inserter should not use the structure ever again, so this > implies > > the use of > > a non-const pointer. In fact, an Any implementation can destroy the > > passed structure and recreate it somewhere else if it so desires. > > Making this emit const* would violate compliance I believe. > > > > John > > > > Oh I'm sorry. Of course the specs always win ... DON'T APPLY THE PATCH ! > > What do the specs say about the namespace the inserters should be > in or not ? My compiler doesn't find them when I try to use them > implicitly inside the namespace I think they belong, i.e. the module > the structures/interfaces are defined in. I simply can't imagine that > they have to be in the global namespace ?! > > Cu, > > Martin > > > _______________________________________________ > orbitcpp-list mailing list > orb...@li... > http://lists.sourceforge.net/lists/listinfo/orbitcpp-list > |