RE: CORBA_any question



Thanks Michael,

Seem like I've used an approach similar to yours. Can you tell me some
more about the nasty _value syntax for strings? 

What about fields of structs transported in any's? Do they also have a
funny syntax?

Regards

/Johan 

------------------------------------------------------------
Johan Antonsson
johan@antonsson.com
------------------------------------------------------------


-----Original Message-----
From: orbit-list-admin@gnome.org [mailto:orbit-list-admin@gnome.org] On
Behalf Of Michael Meeks
Sent: den 19 januari 2004 21:14
To: Johan Antonsson
Cc: Orbit-List (E-mail); ERDI Gergo
Subject: 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

_______________________________________________
orbit-list mailing list
orbit-list@gnome.org
http://mail.gnome.org/mailman/listinfo/orbit-list




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