Re: Typed streams.
- From: Maciej Stachowiak <mjs eazel com>
- To: Michael Meeks <mmeeks gnu org>
- Cc: Miguel de Icaza <miguel helixcode com>, danw helixcode com,gnome-components-list gnome org
- Subject: Re: Typed streams.
- Date: 05 Jul 2000 13:26:36 -0700
Michael Meeks <michael@helixcode.com> writes:
> Hi there,
>
> I was just about to use the stream typing information,
> and I came to the conclusion that it can't do what I want =)
> What I need is to be able to store the type that a stream
> serialized to so that, should I not have the correct object
> ( with the same OAFIID ) to re-hydrate it, that I can do an
> oaf query and fall back to some other type. Hence I need either:
>
> void save (in Bonobo::Stream stream, inout ContentType type)
> ^^^^^
> raises (WrongDataType);
>
> Or; given the general consensus that inout parameters
> are evil and error prone:
>
> ContentType save (in Bonobo::Stream stream,
> in ContentType type)
> ^^
> raises (WrongDataType);
>
> This will nicely solve the problem; however, I'm not
> stopping here, several object [ particularly containers ] will
> need to serialize to a storage. The question is; is it worth
> storing the 'Type' of a Storage ? This would imply that more
> than 1 object was capable of reading a Storage structure; I
> can't think off hand of any circumstances where that would
> happen, indeed it would seem to me that if you don't have the
> object that wrote the storage you are stuffed. If other people
> think differently, we should put typing information onto
> storages.
>
It might be that you at least have objects which can generically view
Storages (something that unpacks it, or browses it like a filesystem,
etc).
- Maciej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]