Bit set class. See https://en.wikipedia.org/wiki/Bit_array. More...
#include <hexrays.hpp>

Classes | |
class | iterator |
Public Types | |
typedef iterator | const_iterator |
Public Member Functions | |
bitset_t (const bitset_t &m) | |
void | swap (bitset_t &r) |
bitset_t & | operator= (const bitset_t &m) |
bitset_t & | copy (const bitset_t &m) |
bool | add (int bit) |
bool | add (int bit, int width) |
bool | add (const bitset_t &ml) |
bool | sub (int bit) |
bool | sub (int bit, int width) |
bool | sub (const bitset_t &ml) |
bool | cut_at (int maxbit) |
void | shift_down (int shift) |
bool | has (int bit) const |
bool | has_all (int bit, int width) const |
bool | has_any (int bit, int width) const |
void | print (qstring *vout, int(*get_bit_name)(qstring *out, int bit, int width, void *ud)=nullptr, void *ud=nullptr) const |
const char * | dstr () const |
bool | empty (void) const |
int | count (void) const |
int | count (int bit) const |
int | last (void) const |
void | clear (void) |
void | fill_with_ones (int maxbit) |
bool | fill_gaps (int total_nbits) |
bool | has_common (const bitset_t &ml) const |
bool | intersect (const bitset_t &ml) |
bool | is_subset_of (const bitset_t &ml) const |
bool | includes (const bitset_t &ml) const |
void | extract (intvec_t &out) const |
DECLARE_COMPARISONS (bitset_t) | |
iterator | itat (int n) const |
iterator | begin (void) const |
iterator | end (void) const |
int | front (void) const |
int | back (void) const |
void | inc (iterator &p, int n=1) const |
Detailed Description
Bit set class. See https://en.wikipedia.org/wiki/Bit_array.
- Examples
- hexrays_sample18.cpp.
Definition at line 1759 of file hexrays.hpp.
Member Typedef Documentation
◆ const_iterator
typedef iterator bitset_t::const_iterator |
Definition at line 1819 of file hexrays.hpp.
Constructor & Destructor Documentation
◆ bitset_t() [1/2]
bitset_t::bitset_t | ( | void | ) |
Definition at line 1765 of file hexrays.hpp.
◆ bitset_t() [2/2]
bitset_t::bitset_t | ( | const bitset_t & | m | ) |
Definition at line 10110 of file hexrays.hpp.
◆ ~bitset_t()
bitset_t::~bitset_t | ( | void | ) |
Definition at line 1767 of file hexrays.hpp.
Member Function Documentation
◆ add() [1/3]
bool bitset_t::add | ( | const bitset_t & | ml | ) |
Definition at line 10134 of file hexrays.hpp.
◆ add() [2/3]
bool bitset_t::add | ( | int | bit | ) |
Definition at line 10122 of file hexrays.hpp.
◆ add() [3/3]
bool bitset_t::add | ( | int | bit, |
int | width | ||
) |
Definition at line 10128 of file hexrays.hpp.
◆ back()
int bitset_t::back | ( | void | ) | const |
Definition at line 1824 of file hexrays.hpp.
◆ begin()
iterator bitset_t::begin | ( | void | ) | const |
Definition at line 1821 of file hexrays.hpp.
◆ clear()
void bitset_t::clear | ( | void | ) |
Definition at line 1799 of file hexrays.hpp.
◆ copy()
Definition at line 10116 of file hexrays.hpp.
◆ count() [1/2]
int bitset_t::count | ( | int | bit | ) | const |
Definition at line 10206 of file hexrays.hpp.
◆ count() [2/2]
int bitset_t::count | ( | void | ) | const |
Definition at line 10200 of file hexrays.hpp.
◆ cut_at()
bool bitset_t::cut_at | ( | int | maxbit | ) |
Definition at line 10158 of file hexrays.hpp.
◆ dstr()
const char * bitset_t::dstr | ( | void | ) | const |
Definition at line 10188 of file hexrays.hpp.
◆ empty()
bool bitset_t::empty | ( | void | ) | const |
Definition at line 10194 of file hexrays.hpp.
◆ end()
iterator bitset_t::end | ( | void | ) | const |
Definition at line 1822 of file hexrays.hpp.
◆ fill_gaps()
bool bitset_t::fill_gaps | ( | int | total_nbits | ) |
Definition at line 10224 of file hexrays.hpp.
◆ fill_with_ones()
void bitset_t::fill_with_ones | ( | int | maxbit | ) |
Definition at line 10218 of file hexrays.hpp.
◆ front()
int bitset_t::front | ( | void | ) | const |
Definition at line 1823 of file hexrays.hpp.
◆ has()
bool bitset_t::has | ( | int | bit | ) | const |
Definition at line 10170 of file hexrays.hpp.
◆ has_all()
bool bitset_t::has_all | ( | int | bit, |
int | width | ||
) | const |
Definition at line 10176 of file hexrays.hpp.
◆ has_any()
bool bitset_t::has_any | ( | int | bit, |
int | width | ||
) | const |
Definition at line 10182 of file hexrays.hpp.
◆ has_common()
bool bitset_t::has_common | ( | const bitset_t & | ml | ) | const |
Definition at line 10230 of file hexrays.hpp.
◆ inc()
void bitset_t::inc | ( | iterator & | p, |
int | n = 1 |
||
) | const |
Definition at line 1825 of file hexrays.hpp.
◆ includes()
bool bitset_t::includes | ( | const bitset_t & | ml | ) | const |
Definition at line 1805 of file hexrays.hpp.
◆ intersect()
bool bitset_t::intersect | ( | const bitset_t & | ml | ) |
Definition at line 10236 of file hexrays.hpp.
◆ is_subset_of()
bool bitset_t::is_subset_of | ( | const bitset_t & | ml | ) | const |
Definition at line 10242 of file hexrays.hpp.
◆ itat()
iterator bitset_t::itat | ( | int | n | ) | const |
Definition at line 1820 of file hexrays.hpp.
◆ last()
int bitset_t::last | ( | void | ) | const |
Definition at line 10212 of file hexrays.hpp.
◆ operator=()
Definition at line 1777 of file hexrays.hpp.
◆ shift_down()
void bitset_t::shift_down | ( | int | shift | ) |
Definition at line 10164 of file hexrays.hpp.
◆ sub() [1/3]
bool bitset_t::sub | ( | const bitset_t & | ml | ) |
Definition at line 10152 of file hexrays.hpp.
◆ sub() [2/3]
bool bitset_t::sub | ( | int | bit | ) |
Definition at line 10140 of file hexrays.hpp.
◆ sub() [3/3]
bool bitset_t::sub | ( | int | bit, |
int | width | ||
) |
Definition at line 10146 of file hexrays.hpp.
◆ swap()
void bitset_t::swap | ( | bitset_t & | r | ) |
Definition at line 1772 of file hexrays.hpp.