28 Dec
2005
28 Dec
'05
8:11 p.m.
Hi All, I'm learning to use the multi-index library by rewriting an existing STL based code. I'm storing rectangles (X, Y, Width, Height, ...) in a set ordered by a composite key on X, Y. What is the best way to select rectangles where X has a certain value and sort the result by Width? Can I use a sorted indice on Width, or I must sort the range? I also thought to create a composite key on X and Width, but sorting order is run time determined and I have a dosen other properties. I'm realy looking for the possibility to mimic SQL's ORDER BY clause. Thanks for any help in advance, Tamas