Boost logo

Boost :

From: Martin Fuchs (martin-fuchs_at_[hidden])
Date: 2002-06-13 19:55:54


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.




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