Stabilizing the DataSet interface?
- From: "Asger K. Alstrup Nielsen" <alstrup diku dk>
- To: guppi-list gnome org
- Subject: Stabilizing the DataSet interface?
- Date: Tue, 2 Feb 1999 19:05:36 +0100 (MET)
Hi!
I've updated the goose cvs tree a bit with some changes
that revive the ascii import a bit, and modify the
DataSet setup a bit.
I've had a look at the new DataSets, and my conclusion is that
I like it. Getting rid of the Values was good, and things
are simpler. However, I did do a few changes to get a
DataConverter into it, because I feel it was a bit too
crippled.
The DataConverter class hierarchy is a simplified
replacement of the old DataType hierarchy. Rather than
having an entity that denotes what type a specific thing
is (and what format it has), it has been changed to be a
utility class that can format different kinds of values in
different formats, and only that.
For instance, some stubs for RealConverter has been implemented,
and this will allow numbers in various formats to be converted
into a "canonical" number format which can be used to extract
semantic information. This canonical format is the format dictated
by printf("%f"), so that strtod can parse it.
The idea idea is that numbers in various formats, such as
1234567.89 1234567,89 1,234,567.89 1.234.567,89
etc. should be handled by the DataSet transparently. With
a DataConverter inside the DataSets, the string interface
gets a clearer abstract meaning IMO: Instead of being a
hack that solves the polymorphic problem, it becomes a true
and fullblown string interface into the data that can be used
for nice input/output.
If you prefer to let the DataSets be DataConverter
ignorant, we can do that. However, I put them in there
for the reason mentioned above, but also because it makes
life for ascii import and other interfacing code easier.
--
Besides that, I wondered about the Random instance
in the DataSet is doing. I thought that we had a global
Random instance, so do we need one in each DataSet?
Finally, I hope we can soon declare some sort of freeze of the
DataSet interface. It has had a few design iterations by now,
and I think it's getting ready to be used in real projects.
And I'd like to do that ;-)
Greets,
Asger
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]