Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2002-06-16 06:33:30


This is a very interesting idea.

However it has a problem within our current implementation, where sort list
is defined at compile time (sort list is the second parameter to the tuple
template). The sort list defaults to the field list, and this is what you
are using, so your sort list doesn't really reflect the sorting order.
Since the sort list is a compile time notion, there is not much we can do to
fix it :0(

Not having the proper sort list means your table will not work properly with
operators that require sorting, currently union, difference, intersection,
etc.

Since a few people expressed concern that we do not support indexing, we are
going to discuss the issue in the nearest future. I think your idea may fit
very nicely there. We can see that what you suggested can be implemented
through indexing (with maybe slightly different interface).

You are more than wellcome to join this discussion.

Thanks a lot for your interest (and for the "bug report" -- we'll fix it as
soon as we can). We are looking forward to any further ideas and/or
comments.

Arkadiy

"Martin Fuchs" <martin-fuchs_at_[hidden]> wrote in message
news:001d01c2133e$3d81ebe0$06005d86_at_m686mx...
>

----------------------------------------------------------------------------

----
> I have been experimenting with your relational templates, which you
recently
> introduced on the boost mailing list.
>
> I want to suggest an extension of your very interesting library:
>
> In the attached source file you can find the implementation of a new table
> sort policy. This one takes an column index as parameter. If you call the
> sort() function, the table content is sorted by an arbitrary column with
> index sort_column. In this way you can sort for any attribute you want,
> without changing your source code or using switch/case's.
> I'm using this kind of thing for a dialog with list view, with displays a
> list of datasets. By clicking on any column header, you can sort the
display
> for the content of this column.
>
> BTW - it's the first time, I'm using type lists.  ;-)
>
> Some thing little more:
> I've defined another usefull macro MYFIELD(Column), which can be used
> instead of FIELD(*this, Column) to access a column of the current object.
>
> Cheers,
>
> Martin
>
>
> P.S.:
> I think, you should add the namespace "rel::" in macro CALCULATED_COLUMN
> like in COLUMN.
>
----------------------------------------------------------------------------
----
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk