29 #ifndef MULTITHREADING_OFF 31 using std::atomic_bool;
33 typedef bool atomic_bool;
48 atomic_bool valid_fullMap_;
49 atomic_bool th_interrupt_;
70 SORTING_moveCount =
'm',
72 SORTING_country =
'c',
73 SORTING_deleted =
'D',
74 SORTING_eventdate =
'E',
75 SORTING_whiteelo =
'W',
76 SORTING_blackelo =
'B',
77 SORTING_commentcount =
'C',
78 SORTING_varcount =
'V',
79 SORTING_nagcount =
'A',
80 SORTING_resultwin =
'1',
81 SORTING_resultdraw =
'5',
82 SORTING_resultloss =
'0',
85 SORTING_sentinel =
'\0' 101 const char* criteria);
131 size_t select(
size_t row_offset,
size_t row_count,
const HFilter& filter,
144 int incrRef(
int incr) {
return refCount_ += incr; }
154 CmpLess(
const SortCache* sc) : sc_(sc) {}
160 void generateHashCache();
161 void sortAsynchronously();
163 void th_interrupt() {
164 th_interrupt_ =
true;
166 th_interrupt_ =
false;
size_t select(size_t row_offset, size_t row_count, const HFilter &filter, gamenumT *result) const
Retrieve the sorted list of games' ids.
void prepareForChanges()
Interrupt any asynchronous operation.
size_t sortedPosition(gamenumT gameId, const HFilter &filter) const
Get the sorted position of a game.
This class stores the database's names (players, events, sites and rounds).
This class sorts games contained into an Index.
static SortCache * create(const Index *idx, const NameBase *nb, const char *criteria)
Create a new SortCache object, builds the hash table, and asynchronously sorts all the games...
void checkForChanges(gamenumT gameId)
Notify the object that a game's header data has changed.