Re: CORBA_any question



Hi Johan,

On Mon, 2004-01-19 at 08:41, Johan Antonsson wrote:
> In my client I'm receiving and sending data with type CORBA_any.
> In many other language mappings there are functions to convert
> to and from Any. Are there any such functions available when
> using C/Orbit2? Can't find much info about Any in the Orbit
> documentation or the C-language mapping docs.

	Well - there is the DynamicAny interface - cf. ORBit2/src/orb/dynany/*
- however it sucks more than you can imagine ( as an interface :-). If
you want to do deeply complex stuff in a standard way though - that's
the code you want.

	OTOH - you don't want that; I tend to do this:

	CORBA_any stack_any;
	stack_any._type = TC_CORBA_double;
	stack_any._value = &stack_double;
	DoCorbaMethod(obj, &stack_any, ev);

	But that's just me - and you come slightly unstuck with strings - which
have a slightly nasty _value syntax.

	We have some accessors in libbonobo - however, they're of the 31337
"don't allocate anything' variety - and suck badly for type safety; we
need to expand that code really to make Anys more usable.

	HTH,

		Michael.	

-- 
 michael@ximian.com  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]