Binary filing and circular references

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Binary filing and circular references

Daniel Rozzeta
Hi all,
Excuse me if this has been explained before.  I just couldn't find any
reference to it.
Is it posible to binary file-out an object with circular references?
If yes, how?

Thanks,
Daniel


Reply | Threaded
Open this post in threaded view
|

Re: Binary filing and circular references

Christopher J. Demers
"Daniel Rozzeta" <[hidden email]> wrote in message
news:[hidden email]...
> Hi all,
> Excuse me if this has been explained before.  I just couldn't find any
> reference to it.
> Is it posible to binary file-out an object with circular references?
> If yes, how?

Yes.  Just use STB, it will automatically handle circular refferences to
objects.  Look at STBOutFiler, Object<<binaryStoreOn: and
Object<<binaryStoreBytes.  You can read all about binary filing in Dolphin
here
http://www.object-arts.com/Lib/EducationCentre4/htm/binaryfilingobjects.htm
.


Reply | Threaded
Open this post in threaded view
|

Re: Binary filing and circular references

Daniel Rozzeta
"Christopher J. Demers" <[hidden email]> wrote in message news:<bbfvmt$8o4fk$[hidden email]>...

> "Daniel Rozzeta" <[hidden email]> wrote in message
> news:[hidden email]...
> > Hi all,
> > Excuse me if this has been explained before.  I just couldn't find any
> > reference to it.
> > Is it posible to binary file-out an object with circular references?
> > If yes, how?
>
> Yes.  Just use STB, it will automatically handle circular refferences to
> objects.  Look at STBOutFiler, Object<<binaryStoreOn: and
> Object<<binaryStoreBytes.  You can read all about binary filing in Dolphin
> here
> http://www.object-arts.com/Lib/EducationCentre4/htm/binaryfilingobjects.htm
> .

Sorry, I did find STB but got fooled first by STBOutFiler class
comment which states: "<STBOutFiler> is the basic binary filer for
serializing a tree of <Object>s to a byte stream" where I understood
"tree" as opposed to DAG or just plain Graph.  And secondly by a
seemingly bug in my own code when I nevertheless tried this procedure.
 Unfortunately it still isn't working, though a simple workspace test
with circular references proves that STB certainly works.

Thanks,
Daniel


Reply | Threaded
Open this post in threaded view
|

Re: Binary filing and circular references

Christopher J. Demers
"Daniel Rozzeta" <[hidden email]> wrote in message
news:[hidden email]...
> Sorry, I did find STB but got fooled first by STBOutFiler class
> comment which states: "<STBOutFiler> is the basic binary filer for
> serializing a tree of <Object>s to a byte stream" where I understood
> "tree" as opposed to DAG or just plain Graph.  And secondly by a
> seemingly bug in my own code when I nevertheless tried this procedure.
>  Unfortunately it still isn't working, though a simple workspace test
> with circular references proves that STB certainly works.

Make sure you are doing super sends if you override some STB support methods
in your classes.  I have done some moderately complex things with STB, and
it has handled everything I have thrown at it so far.  If you post some
error messages, and/or snippets of problem code perhaps we can comment.

Chris