Hi everyone
The data_view widget represents a columned list. It implements an
STL-style interface to an ordered list of rows, through what I call a
"bridged iterator" mechanism. Bridged iterators are RAII wrappers
around iterator objects that use virtual dispatch to connect to a
declared (but not defined) container. These are understandably quite
heavy-weight.
The question is what the "row" interface should look like. I originally
designed it to be a list of items with iterators, much like the list,
but this is a bit too heavy (and hard to implement!) for my liking. I'm
considering reducing it to something like this:
class row
{
datum& operator [](int idx);
const datum& operator [](int idx) const;
datum& operator [](const std::string& column_name);
const datum& operator [](const std::string& column_name) const;
};
(In other words, no iterators). Datum, by the way, is a key/value pair
much like std::map::value_type.
Any thoughts on the subject? Does anyone know of a lighter mechanism
than bridged iterators?
Zhuo Qiang has joined the development team, and I'm going to ask him to
do the Win32 implementation of the data_view (once I've done some
commenting and documentation, which is what I'm doing now). I'm doing
the GTK data_view. Anybody else who'd like to work on other widgets,
please let me know.
Regards
David Turner
|