Gerd Lorscheid wrote:
>
> I will continue to work on the dynamic sorting of the game list window, which
> will
> not change the database.
>
>
May I ask for an interface like this?
std::vector<int> Index::getGamelist (uint start, uint max_count, const
Filter* filter = 0, const std::string& sort = "g+");
so that:
db->idx->getGamelist(20, 10);
returns 10 games starting from the 20th (ordered by game number.
Ignoring filters)
db->idx->getGamelist(20, 10, "W-");
returns 10 games starting from the 20th (ordered descending by White
Elo. Ignoring filters)
db->idx->getGamelist(20, 10, db->dbFilter, "y+");
returns 10 games starting from the 20th (ordered ascending by year. Only
games in dbFilter will be considered)
db->idx->getGamelist(20, 10, db->treeFilter, "i-");
returns 10 games starting from the 20th (ordered desc by "interest".
Only games in treeFilter, i.e. that match the current position, will be
considered)
the result vector can be used like this:
for (int i = 0; i < res.size(); i++) {
IndexEntry* ie = db->idx->FetchEntry (res[i]);
ie->PrintGameInfo (...);
}
Thanks,
Fulvio
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users