[Kst] New virtual method(s) in kstdatasource ?
Nicolas.Brisset at eurocopter.com
Nicolas.Brisset at eurocopter.com
Tue Oct 19 14:39:49 CEST 2004
I wanted to implement support for a in-house format which I unfortunately
cannot change and don't have the specs for. So I am stuck with the current
library and have to use its functions. Now, there is the following problem:
to get data I have to open the file with a function whose arguments contain
the list of fields I'll be reading. As the open/close operations are awfully
slow, it is not realistic to call the corresponding functions in each
readField() call.
Would it be possible to add a new virtual method in kstdatasource that would
be something like readList(const QStringList& fieldsToRead) and inform the
datasource of the fields that are _going to be read_ before the calls to
readField() happen ?
The base implementation could do nothing as existing datasources do not need
this, but I can imagine it could be useful in other cases as well. Maybe we'd
actually need two methods: one to add, the other to remove fields from the
list of fields read from that source. It depends on the objects that manage
these calls and I don't know how they work...
Nicolas
More information about the Kst
mailing list