Re: [orbitcpp-list] Re: orbitcpp-list digest, Vol 1 #177 - 1 msg
Status: Beta
Brought to you by:
philipd
|
From: <MHL...@t-...> - 2001-03-08 10:48:25
|
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
|