I have difficulties in understanding and using the Module Stores in BCF.
I want to store and load a complex tree based data structure in/from a
file.
As I understand the documentation of Module Stores, this can be
accomplished
by the procedures Externalize and Internalize, which are "implement only"
procedures. With this behaviour it seems to be impossible to call
Externalize in a nested fashion.
Example
TYPE
mathObj* = POINTER TO EXTENSIBLE RECORD (Stores.Store) END;
node* = POINTER TO RECORD (mathObj)
m*: mathObj;
next, down: node
END
mathObj is a pointer to different data structures, eg. Bools, Sets,
Rationals, Polynomials etc.
Written an (r: Rational) Externalize procedure for Rationals it is
not possible to call this procedure in the Externalize procedure
for Polynomials.
I don't understand the type bound Internalize procedure, too.
It is possible to determine the type which should be read by
using the INTEGER version in rd.ReadVersion(version) in the
Internalize procedure. But to call the fitting Internalize I need
the unknown type of r: r.Internalize(rd).
Does rd.ReadStore(OUT x: Store) accomplish this task?
It is said that these procedures are used internally and are only
EXTENSIBLE for backward compatiblity which may change in the future.
On the other hand looking in the Form folder I found calls like
r.Externalize^(wr), where a super call to the base method is done.
What's about domains? What do I have to do so that such a tree is
stored and loaded again? Are there other papers to
learn more about this problem?
Thank you very much for your help
Manfred
------------------------------------------------------
Dr. Manfred Wuttke phone: +49 (0) 5204 2944
Hilterweg 14
D-33803 Steinhagen e-mail: wuttke@stein.teuto.de
Germany