#include <sql_bitmap.h>
Collaboration diagram for Bitmap< default_width >:

Public Member Functions | |
| Bitmap () | |
| Bitmap (const Bitmap &from) | |
| Bitmap (uint prefix_to_set) | |
| void | init () |
| void | init (uint prefix_to_set) |
| uint | length () const |
| Bitmap & | operator= (const Bitmap &map2) |
| void | set_bit (uint n) |
| void | clear_bit (uint n) |
| void | set_prefix (uint n) |
| void | set_all () |
| void | clear_all () |
| void | intersect (Bitmap &map2) |
| void | intersect (ulonglong map2buff) |
| void | intersect_extended (ulonglong map2buff) |
| void | subtract (Bitmap &map2) |
| void | merge (Bitmap &map2) |
| my_bool | is_set (uint n) const |
| my_bool | is_prefix (uint n) const |
| my_bool | is_clear_all () const |
| my_bool | is_set_all () const |
| my_bool | is_subset (const Bitmap &map2) const |
| my_bool | is_overlapping (const Bitmap &map2) const |
| my_bool | operator== (const Bitmap &map2) const |
| char * | print (char *buf) const |
| ulonglong | to_ulonglong () const |
Private Attributes | |
| MY_BITMAP | map |
| uint32 | buffer [(default_width+31)/32] |
Definition at line 25 of file sql_bitmap.h.
Definition at line 30 of file sql_bitmap.h.
References Bitmap< default_width >::init().
00030 { init(); }
Here is the call graph for this function:

| Bitmap< default_width >::Bitmap | ( | uint | prefix_to_set | ) | [inline, explicit] |
Definition at line 32 of file sql_bitmap.h.
References Bitmap< default_width >::init().
00032 { init(prefix_to_set); }
Here is the call graph for this function:

| void Bitmap< default_width >::clear_all | ( | ) | [inline] |
Definition at line 46 of file sql_bitmap.h.
References bitmap_clear_all, and Bitmap< default_width >::map.
00046 { bitmap_clear_all(&map); }
Definition at line 43 of file sql_bitmap.h.
References bitmap_clear_bit(), and Bitmap< default_width >::map.
00043 { bitmap_clear_bit(&map, n); }
Here is the call graph for this function:

Definition at line 34 of file sql_bitmap.h.
References Bitmap< default_width >::init(), and Bitmap< default_width >::set_prefix().
00034 { init(); set_prefix(prefix_to_set); }
Here is the call graph for this function:

| void Bitmap< default_width >::init | ( | ) | [inline] |
Definition at line 33 of file sql_bitmap.h.
References bitmap_init(), Bitmap< default_width >::buffer, and Bitmap< default_width >::map.
Referenced by Bitmap< default_width >::Bitmap(), Bitmap< default_width >::init(), and Bitmap< default_width >::operator=().
00033 { bitmap_init(&map, buffer, default_width, 0); }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Bitmap< default_width >::intersect | ( | ulonglong | map2buff | ) | [inline] |
Definition at line 48 of file sql_bitmap.h.
References bitmap_init(), bitmap_intersect(), and Bitmap< default_width >::map.
00049 { 00050 MY_BITMAP map2; 00051 bitmap_init(&map2, (uint32 *)&map2buff, sizeof(ulonglong)*8, 0); 00052 bitmap_intersect(&map, &map2); 00053 }
Here is the call graph for this function:

| void Bitmap< default_width >::intersect | ( | Bitmap< default_width > & | map2 | ) | [inline] |
Definition at line 47 of file sql_bitmap.h.
References bitmap_intersect(), and Bitmap< default_width >::map.
Referenced by Bitmap< default_width >::intersect_extended().
00047 { bitmap_intersect(&map, &map2.map); }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Bitmap< default_width >::intersect_extended | ( | ulonglong | map2buff | ) | [inline] |
Definition at line 55 of file sql_bitmap.h.
References bitmap_set_above(), Bitmap< default_width >::intersect(), LL, Bitmap< default_width >::map, st_bitmap::n_bits, and test.
00056 { 00057 intersect(map2buff); 00058 if (map.n_bits > sizeof(ulonglong) * 8) 00059 bitmap_set_above(&map, sizeof(ulonglong), 00060 test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1)))); 00061 }
Here is the call graph for this function:

Definition at line 66 of file sql_bitmap.h.
References bitmap_is_clear_all(), and Bitmap< default_width >::map.
00066 { return bitmap_is_clear_all(&map); }
Here is the call graph for this function:

| my_bool Bitmap< default_width >::is_overlapping | ( | const Bitmap< default_width > & | map2 | ) | const [inline] |
Definition at line 69 of file sql_bitmap.h.
References bitmap_is_overlapping(), and Bitmap< default_width >::map.
00069 { return bitmap_is_overlapping(&map, map2.map); }
Here is the call graph for this function:

Definition at line 65 of file sql_bitmap.h.
References bitmap_is_prefix(), and Bitmap< default_width >::map.
00065 { return bitmap_is_prefix(&map, n); }
Here is the call graph for this function:

Definition at line 64 of file sql_bitmap.h.
References bitmap_is_set(), and Bitmap< default_width >::map.
00064 { return bitmap_is_set(&map, n); }
Here is the call graph for this function:

Definition at line 67 of file sql_bitmap.h.
References bitmap_is_set_all(), and Bitmap< default_width >::map.
00067 { return bitmap_is_set_all(&map); }
Here is the call graph for this function:

| my_bool Bitmap< default_width >::is_subset | ( | const Bitmap< default_width > & | map2 | ) | const [inline] |
Definition at line 68 of file sql_bitmap.h.
References bitmap_is_subset(), and Bitmap< default_width >::map.
00068 { return bitmap_is_subset(&map, &map2.map); }
Here is the call graph for this function:

Definition at line 35 of file sql_bitmap.h.
Referenced by Bitmap< 64 >::set_prefix().
Here is the caller graph for this function:

| void Bitmap< default_width >::merge | ( | Bitmap< default_width > & | map2 | ) | [inline] |
Definition at line 63 of file sql_bitmap.h.
References bitmap_union(), and Bitmap< default_width >::map.
00063 { bitmap_union(&map, &map2.map); }
Here is the call graph for this function:

| Bitmap& Bitmap< default_width >::operator= | ( | const Bitmap< default_width > & | map2 | ) | [inline] |
Definition at line 36 of file sql_bitmap.h.
References Bitmap< default_width >::buffer, Bitmap< default_width >::init(), and memcpy.
00037 { 00038 init(); 00039 memcpy(buffer, map2.buffer, sizeof(buffer)); 00040 return *this; 00041 }
Here is the call graph for this function:

| my_bool Bitmap< default_width >::operator== | ( | const Bitmap< default_width > & | map2 | ) | const [inline] |
Definition at line 70 of file sql_bitmap.h.
References bitmap_cmp(), and Bitmap< default_width >::map.
00070 { return bitmap_cmp(&map, &map2.map); }
Here is the call graph for this function:

| char* Bitmap< default_width >::print | ( | char * | buf | ) | const [inline] |
Definition at line 71 of file sql_bitmap.h.
References _dig_vec_upper, Bitmap< default_width >::buffer, and e.
00072 { 00073 char *s=buf; 00074 const uchar *e=(uchar *)buffer, *b=e+sizeof(buffer)-1; 00075 while (!*b && b>e) 00076 b--; 00077 if ((*s=_dig_vec_upper[*b >> 4]) != '0') 00078 s++; 00079 *s++=_dig_vec_upper[*b & 15]; 00080 while (--b>=e) 00081 { 00082 *s++=_dig_vec_upper[*b >> 4]; 00083 *s++=_dig_vec_upper[*b & 15]; 00084 } 00085 *s=0; 00086 return buf; 00087 }
| void Bitmap< default_width >::set_all | ( | ) | [inline] |
Definition at line 45 of file sql_bitmap.h.
References bitmap_set_all, and Bitmap< default_width >::map.
Referenced by Bitmap< 64 >::set_prefix().
00045 { bitmap_set_all(&map); }
Here is the caller graph for this function:

Definition at line 42 of file sql_bitmap.h.
References bitmap_set_bit(), and Bitmap< default_width >::map.
00042 { bitmap_set_bit(&map, n); }
Here is the call graph for this function:

Definition at line 44 of file sql_bitmap.h.
References bitmap_set_prefix(), and Bitmap< default_width >::map.
Referenced by Bitmap< 64 >::init(), and Bitmap< default_width >::init().
00044 { bitmap_set_prefix(&map, n); }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Bitmap< default_width >::subtract | ( | Bitmap< default_width > & | map2 | ) | [inline] |
Definition at line 62 of file sql_bitmap.h.
References bitmap_subtract(), and Bitmap< default_width >::map.
00062 { bitmap_subtract(&map, &map2.map); }
Here is the call graph for this function:

Definition at line 88 of file sql_bitmap.h.
References Bitmap< default_width >::buffer, DBUG_ASSERT, uint4korr, and uint8korr.
00089 { 00090 if (sizeof(buffer) >= 8) 00091 return uint8korr(buffer); 00092 DBUG_ASSERT(sizeof(buffer) >= 4); 00093 return (ulonglong) uint4korr(buffer); 00094 }
uint32 Bitmap< default_width >::buffer[(default_width+31)/32] [private] |
Definition at line 28 of file sql_bitmap.h.
Referenced by Bitmap< default_width >::init(), Bitmap< default_width >::operator=(), Bitmap< default_width >::print(), and Bitmap< default_width >::to_ulonglong().
Definition at line 27 of file sql_bitmap.h.
Referenced by Bitmap< 64 >::clear_all(), Bitmap< default_width >::clear_all(), Bitmap< 64 >::clear_bit(), Bitmap< default_width >::clear_bit(), Bitmap< default_width >::init(), Bitmap< 64 >::intersect(), Bitmap< default_width >::intersect(), Bitmap< 64 >::intersect_extended(), Bitmap< default_width >::intersect_extended(), Bitmap< 64 >::is_clear_all(), Bitmap< default_width >::is_clear_all(), Bitmap< 64 >::is_overlapping(), Bitmap< default_width >::is_overlapping(), Bitmap< 64 >::is_prefix(), Bitmap< default_width >::is_prefix(), Bitmap< 64 >::is_set(), Bitmap< default_width >::is_set(), Bitmap< 64 >::is_set_all(), Bitmap< default_width >::is_set_all(), Bitmap< 64 >::is_subset(), Bitmap< default_width >::is_subset(), Bitmap< 64 >::merge(), Bitmap< default_width >::merge(), Bitmap< 64 >::operator==(), Bitmap< default_width >::operator==(), Bitmap< 64 >::print(), Bitmap< 64 >::set_all(), Bitmap< default_width >::set_all(), Bitmap< 64 >::set_bit(), Bitmap< default_width >::set_bit(), Bitmap< 64 >::set_prefix(), Bitmap< default_width >::set_prefix(), Bitmap< 64 >::subtract(), Bitmap< default_width >::subtract(), and Bitmap< 64 >::to_ulonglong().
1.4.7

