|  | 
| constexpr | BitMask (WordType init_value) | 
|  | 
| bool | __nonzero__ () const | 
|  | Returns true if the bitmask is not zero.  More... 
 | 
|  | 
| void | clear () | 
|  | Sets all the bits in the BitMask off.  More... 
 | 
|  | 
| void | clear_bit (int index) | 
|  | Sets the nth bit off.  More... 
 | 
|  | 
| void | clear_range (int low_bit, int size) | 
|  | Sets the indicated range of bits off.  More... 
 | 
|  | 
| int | compare_to (const BitMask< WType, nbits > &other) const | 
|  | Returns a number less than zero if this BitMask sorts before the indicated other BitMask, greater than zero if it sorts after, or 0 if they are equivalent.  More... 
 | 
|  | 
| WordType | extract (int low_bit, int size) const | 
|  | Returns a word that represents only the indicated range of bits within this BitMask, shifted to the least-significant position.  More... 
 | 
|  | 
| BitMask< WType, nbits > | flood_bits_down () const | 
|  | Returns a BitMask with the bits flooded down.  More... 
 | 
|  | 
| BitMask< WType, nbits > | flood_bits_up () const | 
|  | Returns a BitMask with the bits flooded upwards.  More... 
 | 
|  | 
| void | flood_down_in_place () | 
|  | Floods this bitmask's bits downwards.  More... 
 | 
|  | 
| void | flood_up_in_place () | 
|  | Floods this bitmask's bits upwards.  More... 
 | 
|  | 
| void | generate_hash (ChecksumHashGenerator &hashgen) const | 
|  | Adds the bitmask to the indicated hash generator.  More... 
 | 
|  | 
| bool | get_bit (int index) const | 
|  | Returns true if the nth bit is set, false if it is cleared.  More... 
 | 
|  | 
| int | get_highest_off_bit () const | 
|  | Returns the index of the highest 0 bit in the mask.  More... 
 | 
|  | 
| int | get_highest_on_bit () const | 
|  | Returns the index of the highest 1 bit in the mask.  More... 
 | 
|  | 
| int | get_key () const | 
|  | Returns a mostly unique integer key per unique bitmask, suitable for using in a hash table.  More... 
 | 
|  | 
| int | get_lowest_off_bit () const | 
|  | Returns the index of the lowest 0 bit in the mask.  More... 
 | 
|  | 
| int | get_lowest_on_bit () const | 
|  | Returns the index of the lowest 1 bit in the mask.  More... 
 | 
|  | 
| int | get_next_higher_different_bit (int low_bit) const | 
|  | Returns the index of the next bit in the mask, above low_bit, whose value is different that the value of low_bit.  More... 
 | 
|  | 
| constexpr int | get_num_bits () const | 
|  | Returns the number of bits available to set in the bitmask.  More... 
 | 
|  | 
| int | get_num_off_bits () const | 
|  | Returns the number of bits that are set to 0 in the mask.  More... 
 | 
|  | 
| int | get_num_on_bits () const | 
|  | Returns the number of bits that are set to 1 in the mask.  More... 
 | 
|  | 
| WordType | get_word () const | 
|  | Returns the entire BitMask as a single word.  More... 
 | 
|  | 
| bool | has_all_of (int low_bit, int size) const | 
|  | Returns true if all bits in the indicated range are set, false otherwise.  More... 
 | 
|  | 
| bool | has_any_of (int low_bit, int size) const | 
|  | Returns true if any bit in the indicated range is set, false otherwise.  More... 
 | 
|  | 
| bool | has_bits_in_common (const BitMask< WType, nbits > &other) const | 
|  | Returns true if this BitMask has any "one" bits in common with the other one, false otherwise.  More... 
 | 
|  | 
| void | invert_in_place () | 
|  | Inverts all the bits in the BitMask.  More... 
 | 
|  | 
| bool | is_all_on () const | 
|  | Returns true if the entire bitmask is one, false otherwise.  More... 
 | 
|  | 
| bool | is_zero () const | 
|  | Returns true if the entire bitmask is zero, false otherwise.  More... 
 | 
|  | 
| BitMask< WType, nbits > | keep_next_highest_bit () const | 
|  | Returns a BitMask with only the next highest bit above the indicated bit on, or all_off.  More... 
 | 
|  | 
| BitMask< WType, nbits > | keep_next_highest_bit (int index) const | 
|  | Returns a BitMask with only the next highest bit above the indicated bit on, or all.  More... 
 | 
|  | 
| BitMask< WType, nbits > | keep_next_highest_bit (const BitMask< WType, nbits > &other) const | 
|  | Returns a BitMask with only the next highest "on" bit above all "on" bits in the passed in bitmask, or all_off.  More... 
 | 
|  | 
| BitMask< WType, nbits > | keep_next_lowest_bit () const | 
|  | Returns a BitMask with only the next lower bit below the indicated bit on, or all_off.  More... 
 | 
|  | 
| BitMask< WType, nbits > | keep_next_lowest_bit (int index) const | 
|  | Returns a BitMask with only the next lower bit below the indicated bit on, or all_off.  More... 
 | 
|  | 
| BitMask< WType, nbits > | keep_next_lowest_bit (const BitMask< WType, nbits > &other) const | 
|  | Returns a BitMask with only the next lowest "on" bit below all "on" bits in the passed in bitmask, or all_off.  More... 
 | 
|  | 
| bool | operator != (const BitMask< WType, nbits > &other) const | 
|  | 
| BitMask< WType, nbits > | operator & (const BitMask< WType, nbits > &other) const | 
|  | 
| void | operator &= (const BitMask< WType, nbits > &other) | 
|  | 
| BitMask< WType, nbits > | operator >> (int shift) const | 
|  | 
| void | operator >>= (int shift) | 
|  | 
| BitMask< WType, nbits > | operator ^ (const BitMask< WType, nbits > &other) const | 
|  | 
| void | operator ^= (const BitMask< WType, nbits > &other) | 
|  | 
| BitMask< WType, nbits > | operator ~ () const | 
|  | 
| bool | operator< (const BitMask< WType, nbits > &other) const | 
|  | The ordering operator is of limited usefulness with a BitMask, however, it has a definition which places all unique BitMasks into a unique ordering.  More... 
 | 
|  | 
| BitMask< WType, nbits > | operator<< (int shift) const | 
|  | 
| void | operator<<= (int shift) | 
|  | 
| bool | operator== (const BitMask< WType, nbits > &other) const | 
|  | 
| BitMask< WType, nbits > | operator| (const BitMask< WType, nbits > &other) const | 
|  | 
| void | operator|= (const BitMask< WType, nbits > &other) | 
|  | 
| void | output (std::ostream &out) const | 
|  | Writes the BitMask out as a binary or a hex number, according to the number of bits.  More... 
 | 
|  | 
| void | output_binary (std::ostream &out, int spaces_every=4) const | 
|  | Writes the BitMask out as a binary number, with spaces every four bits.  More... 
 | 
|  | 
| void | output_hex (std::ostream &out, int spaces_every=4) const | 
|  | Writes the BitMask out as a hexadecimal number, with spaces every four digits.  More... 
 | 
|  | 
| void | set_bit (int index) | 
|  | Sets the nth bit on.  More... 
 | 
|  | 
| void | set_bit_to (int index, bool value) | 
|  | Sets the nth bit either on or off, according to the indicated bool value.  More... 
 | 
|  | 
| void | set_range (int low_bit, int size) | 
|  | Sets the indicated range of bits on.  More... 
 | 
|  | 
| void | set_range_to (bool value, int low_bit, int size) | 
|  | Sets the indicated range of bits to either on or off.  More... 
 | 
|  | 
| void | set_word (WordType value) | 
|  | Sets the entire BitMask to the value indicated by the given word.  More... 
 | 
|  | 
| void | store (WordType value, int low_bit, int size) | 
|  | Stores the indicated word into the indicated range of bits with this BitMask.  More... 
 | 
|  | 
| void | write (std::ostream &out, int indent_level=0) const | 
|  | Writes the BitMask out as a binary or a hex number, according to the number of bits.  More... 
 | 
|  | 
template<class WType, int nbits>
class BitMask< WType, nbits >
A general bitmask class. 
This stores an array of bits of some length that must fit within a given word of the indicated type. See also BitArray. 
Definition at line 32 of file bitMask.h.