~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_bitmap.h

  • Committer: Brian Aker
  • Date: 2009-04-13 16:22:40 UTC
  • mfrom: (971.1.78 mordred)
  • Revision ID: brian@gaz-20090413162240-ugi3gvhofmcuglzl
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
/// TODO: OMG FIX THIS
30
30
 
31
31
#include <mysys/my_bitmap.h>
 
32
#include <drizzled/definitions.h>
32
33
#include <drizzled/util/test.h>
33
34
 
 
35
#include <bitset>
 
36
 
34
37
template <uint32_t default_width> class Bitmap
35
38
{
36
39
  MY_BITMAP map;
215
218
extern const key_map key_map_empty;
216
219
extern key_map key_map_full;          /* Should be threaded as const */
217
220
 
 
221
/*
 
222
 * Finds the first bit that is not set and sets
 
223
 * it.
 
224
 *
 
225
 * @param the bitmap to work with
 
226
 */
 
227
uint32_t setNextBit(std::bitset<MAX_FIELDS> &bitmap);
 
228
 
 
229
/*
 
230
 * Returns the position of the first bit in the
 
231
 * given bitmap which is not set. If every bit is set
 
232
 * in the bitmap, return MY_BIT_NONE.
 
233
 *
 
234
 * @param the bitmap to work with
 
235
 */
 
236
uint32_t getFirstBitPos(const std::bitset<MAX_FIELDS> &bitmap);
 
237
 
 
238
/*
 
239
 * Returns true if there is any overlapping bits between
 
240
 * the 2 given bitmaps.
 
241
 *
 
242
 * @param the first bitmap to work with
 
243
 * @param the second bitmap to work with
 
244
 */
 
245
bool isBitmapOverlapping(const std::bitset<MAX_FIELDS> *map1, const std::bitset<MAX_FIELDS> *map2);
 
246
 
218
247
#endif /* _SQL_BITMAP_H_ */