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 () const |
int | count () const |
int | count (int bit) const |
int | last () const |
void | clear () |
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 () const |
iterator | end () const |
int | front () const |
int | back () 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 1748 of file hexrays.hpp.
Member Typedef Documentation
◆ const_iterator
typedef iterator bitset_t::const_iterator |
Definition at line 1808 of file hexrays.hpp.
Constructor & Destructor Documentation
◆ bitset_t() [1/2]
bitset_t::bitset_t | ( | ) |
Definition at line 1754 of file hexrays.hpp.
◆ bitset_t() [2/2]
bitset_t::bitset_t | ( | const bitset_t & | m | ) |
Definition at line 10163 of file hexrays.hpp.
◆ ~bitset_t()
bitset_t::~bitset_t | ( | ) |
Definition at line 1756 of file hexrays.hpp.
Member Function Documentation
◆ add() [1/3]
bool bitset_t::add | ( | const bitset_t & | ml | ) |
Definition at line 10187 of file hexrays.hpp.
◆ add() [2/3]
bool bitset_t::add | ( | int | bit | ) |
Definition at line 10175 of file hexrays.hpp.
◆ add() [3/3]
bool bitset_t::add | ( | int | bit, |
int | width | ||
) |
Definition at line 10181 of file hexrays.hpp.
◆ back()
int bitset_t::back | ( | ) | const |
Definition at line 1813 of file hexrays.hpp.
◆ begin()
iterator bitset_t::begin | ( | ) | const |
Definition at line 1810 of file hexrays.hpp.
◆ clear()
void bitset_t::clear | ( | ) |
Definition at line 1788 of file hexrays.hpp.
◆ copy()
Definition at line 10169 of file hexrays.hpp.
◆ count() [1/2]
int bitset_t::count | ( | ) | const |
Definition at line 10253 of file hexrays.hpp.
◆ count() [2/2]
int bitset_t::count | ( | int | bit | ) | const |
Definition at line 10259 of file hexrays.hpp.
◆ cut_at()
bool bitset_t::cut_at | ( | int | maxbit | ) |
Definition at line 10211 of file hexrays.hpp.
◆ dstr()
const char * bitset_t::dstr | ( | ) | const |
Definition at line 10241 of file hexrays.hpp.
◆ empty()
bool bitset_t::empty | ( | ) | const |
Definition at line 10247 of file hexrays.hpp.
◆ end()
iterator bitset_t::end | ( | ) | const |
Definition at line 1811 of file hexrays.hpp.
◆ fill_gaps()
bool bitset_t::fill_gaps | ( | int | total_nbits | ) |
Definition at line 10277 of file hexrays.hpp.
◆ fill_with_ones()
void bitset_t::fill_with_ones | ( | int | maxbit | ) |
Definition at line 10271 of file hexrays.hpp.
◆ front()
int bitset_t::front | ( | ) | const |
Definition at line 1812 of file hexrays.hpp.
◆ has()
bool bitset_t::has | ( | int | bit | ) | const |
Definition at line 10223 of file hexrays.hpp.
◆ has_all()
bool bitset_t::has_all | ( | int | bit, |
int | width | ||
) | const |
Definition at line 10229 of file hexrays.hpp.
◆ has_any()
bool bitset_t::has_any | ( | int | bit, |
int | width | ||
) | const |
Definition at line 10235 of file hexrays.hpp.
◆ has_common()
bool bitset_t::has_common | ( | const bitset_t & | ml | ) | const |
Definition at line 10283 of file hexrays.hpp.
◆ inc()
void bitset_t::inc | ( | iterator & | p, |
int | n = 1 |
||
) | const |
Definition at line 1814 of file hexrays.hpp.
◆ includes()
bool bitset_t::includes | ( | const bitset_t & | ml | ) | const |
Definition at line 1794 of file hexrays.hpp.
◆ intersect()
bool bitset_t::intersect | ( | const bitset_t & | ml | ) |
Definition at line 10289 of file hexrays.hpp.
◆ is_subset_of()
bool bitset_t::is_subset_of | ( | const bitset_t & | ml | ) | const |
Definition at line 10295 of file hexrays.hpp.
◆ itat()
iterator bitset_t::itat | ( | int | n | ) | const |
Definition at line 1809 of file hexrays.hpp.
◆ last()
int bitset_t::last | ( | ) | const |
Definition at line 10265 of file hexrays.hpp.
◆ operator=()
Definition at line 1766 of file hexrays.hpp.
◆ shift_down()
void bitset_t::shift_down | ( | int | shift | ) |
Definition at line 10217 of file hexrays.hpp.
◆ sub() [1/3]
bool bitset_t::sub | ( | const bitset_t & | ml | ) |
Definition at line 10205 of file hexrays.hpp.
◆ sub() [2/3]
bool bitset_t::sub | ( | int | bit | ) |
Definition at line 10193 of file hexrays.hpp.
◆ sub() [3/3]
bool bitset_t::sub | ( | int | bit, |
int | width | ||
) |
Definition at line 10199 of file hexrays.hpp.
◆ swap()
void bitset_t::swap | ( | bitset_t & | r | ) |
Definition at line 1761 of file hexrays.hpp.