Re: Storing and restrieving objects



Hi Peter,

On Thu, 2003-09-04 at 10:58, Peter Van Osta wrote:
> I am currently doing some tests with storing and restrieving CORBA
> objects to and from disk. When defining structures/objects which contain
> a lot of elelemnts it is almost impossible to write and read them from a
> file, using "text-mode" and saving and retrieving individual elements.

	Hrm :-) well, you can never serialise a CORBA Object, only it's data [
since the code can't be serialised ].

	Ideally of course; you'd want to use some C <-> GIOP type mapping; I
guess something like:

	GIOPSendBuffer *custom_buffer = giop_send_buffer_new ();
	ORBit_marshal_value (custom_buffer, &struct_ptr, TC_MyStruct);
	giop_send_buffer_write( custom_buffer, open("/tmp/foo-file") );

	Or somesuch ?

	Currently I believe we hide all that implementation in the ORB so that
people can't get at it ;-)

	Of course - if you can come up with some nice solution to allow this to
be re-used elegantly ( I guess the above is not all that bad API-wise ),
then I'd be most happy to see it in CVS; perhaps even a simpler method:

	ORBit_marshal_value_to_stream(gpointer val, CORBA_TypeCode,
				      int fd_stream);

	and the reverse of course;

	Can you hack that up ?

	Regards,

		Michael.

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




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