MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BitmaskPOD< size > Struct Template Reference

#include <Bitmask.hpp>

Inheritance diagram for BitmaskPOD< size >:
Collaboration diagram for BitmaskPOD< size >:

Classes

struct  Data

Public Member Functions

 STATIC_CONST (Size=size)
 STATIC_CONST (NotFound=BitmaskImpl::NotFound)
 STATIC_CONST (TextLength=size *8)
Uint32 getSizeInWords () const
unsigned max_size () const
void assign (const typename BitmaskPOD< size >::Data &src)
void assign (const BitmaskPOD< size > &src)
void copyto (unsigned sz, Uint32 dst[]) const
void assign (unsigned sz, const Uint32 src[])
bool get (unsigned n) const
void set (unsigned n, bool value)
void set (unsigned n)
void set ()
void setRange (Uint32 pos, Uint32 len)
void clear (unsigned n)
void clear ()
Uint32 getWord (unsigned word_pos)
void setWord (unsigned word_pos, Uint32 new_word)
bool isclear () const
unsigned count () const
unsigned find_first () const
unsigned find_next (unsigned n) const
unsigned find (unsigned n) const
bool equal (const BitmaskPOD< size > &mask2) const
BitmaskPOD< size > & bitOR (const BitmaskPOD< size > &mask2)
BitmaskPOD< size > & bitAND (const BitmaskPOD< size > &mask2)
BitmaskPOD< size > & bitANDC (const BitmaskPOD< size > &mask2)
BitmaskPOD< size > & bitXOR (const BitmaskPOD< size > &mask2)
BitmaskPOD< size > & bitXORC (const BitmaskPOD< size > &mask2)
BitmaskPOD< size > & bitNOT ()
bool contains (BitmaskPOD< size > that)
bool overlaps (BitmaskPOD< size > that)
char * getText (char *buf) const
Uint32 toArray (Uint8 *dst, Uint32 len) const

Static Public Member Functions

static void assign (Uint32 dst[], const Uint32 src[])
static void assign (Uint32 dst[], const BitmaskPOD< size > &src)
static bool get (const Uint32 data[], unsigned n)
static void set (Uint32 data[], unsigned n, bool value)
static void set (Uint32 data[], unsigned n)
static void set (Uint32 data[])
static void setRange (Uint32 data[], Uint32 pos, Uint32 len)
static void clear (Uint32 data[], unsigned n)
static void clear (Uint32 data[])
static bool isclear (const Uint32 data[])
static unsigned count (const Uint32 data[])
static unsigned find_first (const Uint32 data[])
static unsigned find_next (const Uint32 data[], unsigned n)
static unsigned find (const Uint32 data[], unsigned n)
static bool equal (const Uint32 data[], const Uint32 data2[])
static void bitOR (Uint32 data[], const Uint32 data2[])
static void bitAND (Uint32 data[], const Uint32 data2[])
static void bitANDC (Uint32 data[], const Uint32 data2[])
static void bitXOR (Uint32 data[], const Uint32 data2[])
static void bitXORC (Uint32 data[], const Uint32 data2[])
static void bitNOT (Uint32 data[])
static bool contains (Uint32 data[], const Uint32 data2[])
static bool overlaps (Uint32 data[], const Uint32 data2[])
static char * getText (const Uint32 data[], char *buf)
static Uint32 toArray (Uint8 *dst, Uint32 len, const Uint32 data[])

Public Attributes

Data rep

Detailed Description

template<unsigned size>
struct BitmaskPOD< size >

Bitmasks. The size is number of 32-bit words (Uint32). Unused bits in the last word must be zero.

XXX replace size by length in bits

Definition at line 619 of file Bitmask.hpp.

Member Function Documentation

template<unsigned size>
void BitmaskPOD< size >::assign ( const typename BitmaskPOD< size >::Data src)
inline

assign - Set all bits in dst to corresponding in src/

Definition at line 831 of file Bitmask.hpp.

Here is the caller graph for this function:

template<unsigned size>
void BitmaskPOD< size >::assign ( Uint32  dst[],
const Uint32  src[] 
)
inlinestatic

assign - Set all bits in dst to corresponding in src/

Definition at line 817 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::assign ( unsigned  sz,
const Uint32  src[] 
)
inline

assign this according to src/em>

Definition at line 852 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::bitAND ( Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitAND - Bitwise (x & y) into first operand.

Definition at line 1071 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
void BitmaskPOD< size >::bitANDC ( Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitANDC - Bitwise (x & ~y) into first operand.

Definition at line 1086 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
void BitmaskPOD< size >::bitNOT ( Uint32  data[])
inlinestatic

bitNOT - Bitwise (~x) in first operand.

Definition at line 1131 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::bitOR ( Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitOR - Bitwise (x | y) into first operand.

Definition at line 1056 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::bitXOR ( Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitXOR - Bitwise (x ^ y) into first operand.

Definition at line 1101 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::bitXORC ( Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitXORC - Bitwise (x ^ ~y) into first operand.

Definition at line 1116 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::clear ( Uint32  data[],
unsigned  n 
)
inlinestatic

clear - Clear bit n.

Definition at line 930 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
void BitmaskPOD< size >::clear ( Uint32  data[])
inlinestatic

clear - Clear all bits.

Definition at line 944 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
bool BitmaskPOD< size >::contains ( Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

contains - Check if all bits set in data2 (that) are also set in data (this)

Definition at line 1160 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::copyto ( unsigned  sz,
Uint32  dst[] 
) const
inline

copy this to dst

Definition at line 845 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
unsigned BitmaskPOD< size >::count ( const Uint32  data[])
inlinestatic

count - Count number of set bits.

Definition at line 986 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
bool BitmaskPOD< size >::equal ( const Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

equal - Bitwise equal.

Definition at line 1042 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
unsigned BitmaskPOD< size >::find ( const Uint32  data[],
unsigned  n 
)
inlinestatic

find - Find first set bit, starting at given position. Returns NotFound when not found.

Definition at line 1028 of file Bitmask.hpp.

Here is the caller graph for this function:

template<unsigned size>
unsigned BitmaskPOD< size >::find_first ( const Uint32  data[])
inlinestatic

find - Find first set bit, starting at 0 Returns NotFound when not found.

Definition at line 1000 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
unsigned BitmaskPOD< size >::find_next ( const Uint32  data[],
unsigned  n 
)
inlinestatic

find - Find first set bit, starting at 0 Returns NotFound when not found.

Definition at line 1014 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
bool BitmaskPOD< size >::get ( const Uint32  data[],
unsigned  n 
)
inlinestatic

start of static members get - Check if bit n is set.

Definition at line 859 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
char * BitmaskPOD< size >::getText ( const Uint32  data[],
char *  buf 
)
inlinestatic

getText - Return as hex-digits (only for debug routines).

Definition at line 1146 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
Uint32 BitmaskPOD< size >::getWord ( unsigned  word_pos)
inline

Get and set words of bits

Definition at line 958 of file Bitmask.hpp.

template<unsigned size>
bool BitmaskPOD< size >::isclear ( const Uint32  data[])
inlinestatic

isclear - Check if all bits are clear. This is faster than checking count() == 0.

Definition at line 972 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
bool BitmaskPOD< size >::overlaps ( Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

overlaps - Check if any bit set in this BitmaskPOD (data) is also set in that (data2)

Definition at line 1174 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::set ( Uint32  data[],
unsigned  n,
bool  value 
)
inlinestatic

set - Set bit n to given value (true/false).

Definition at line 873 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned size>
void BitmaskPOD< size >::set ( Uint32  data[],
unsigned  n 
)
inlinestatic

set - Set bit n.

Definition at line 887 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::set ( Uint32  data[])
inlinestatic

set - set all bits.

Definition at line 901 of file Bitmask.hpp.

Here is the call graph for this function:

template<unsigned size>
void BitmaskPOD< size >::setRange ( Uint32  data[],
Uint32  pos,
Uint32  len 
)
inlinestatic

set - set a range of bits

Definition at line 915 of file Bitmask.hpp.

Here is the call graph for this function:


The documentation for this struct was generated from the following file: