Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ibitset Class Reference
[bitset]
The base class for etl::bitset. More...
#include <bitset.h>
Inherited by bitset< WIDTH >, and bitset< MAXN >.
Data Structures | |
class | bit_reference |
The reference type returned. More... | |
Public Member Functions | |
size_t | size () const |
The size of the bitset. | |
size_t | count () const |
Count the number of bits set. | |
bool | test (size_t position) const |
Tests a bit at a position. | |
ibitset & | set () |
Set the bit at the position. | |
ibitset & | set (size_t position, bool value=true) |
Set the bit at the position. | |
ibitset & | set (const char *text) |
Set from a string. | |
ibitset & | reset () |
Resets the bitset. | |
ibitset & | reset (size_t position) |
Reset the bit at the position. | |
ibitset & | flip () |
Flip all of the bits. | |
ibitset & | flip (size_t position) |
Flip the bit at the position. | |
bool | any () const |
Are any of the bits set? | |
bool | none () const |
Are none of the bits set? | |
size_t | find_first (bool state) const |
Finds the first bit in the specified state. | |
size_t | find_next (bool state, size_t position) const |
Finds the next bit in the specified state. | |
bool | operator[] (size_t position) const |
Read [] operator. | |
bit_reference | operator[] (size_t position) |
Write [] operator. | |
ibitset & | operator&= (const ibitset &other) |
operator &= | |
ibitset & | operator|= (const ibitset &other) |
operator |= | |
ibitset & | operator^= (const ibitset &other) |
operator ^= | |
ibitset & | operator<<= (size_t shift) |
operator <<= | |
ibitset & | operator>>= (size_t shift) |
operator >>= | |
ibitset & | operator= (const ibitset &other) |
operator = | |
void | swap (ibitset &other) |
swap | |
Protected Member Functions | |
ibitset & | initialise (unsigned long long value) |
Initialise from an unsigned long long. | |
void | invert () |
Invert. | |
bit_reference | get_bit_reference (size_t position) |
Gets a reference to the specified bit. | |
ibitset (size_t nbits_, size_t size_, element_t *pdata_) | |
Constructor. | |
Static Protected Member Functions | |
static bool | is_equal (const ibitset &lhs, const ibitset &rhs) |
Compare bitsets. |
Detailed Description
The base class for etl::bitset.
Definition at line 99 of file bitset.h.
Constructor & Destructor Documentation
ibitset | ( | size_t | nbits_, |
size_t | size_, | ||
element_t * | pdata_ | ||
) | [protected] |
Member Function Documentation
size_t find_first | ( | bool | state ) | const |
size_t find_next | ( | bool | state, |
size_t | position | ||
) | const |
ibitset& flip | ( | ) |
Flip all of the bits.
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
ibitset& flip | ( | size_t | position ) |
Flip the bit at the position.
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
bit_reference get_bit_reference | ( | size_t | position ) | [protected] |
ibitset& initialise | ( | unsigned long long | value ) | [protected] |
ibitset& operator<<= | ( | size_t | shift ) |
operator <<=
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
ibitset& operator>>= | ( | size_t | shift ) |
operator >>=
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
bit_reference operator[] | ( | size_t | position ) |
bool operator[] | ( | size_t | position ) | const |
ibitset& reset | ( | size_t | position ) |
Reset the bit at the position.
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
ibitset& reset | ( | ) |
Resets the bitset.
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
Set from a string.
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
Set the bit at the position.
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
Set the bit at the position.
Reimplemented in bitset< MAXN >, and bitset< WIDTH >.
Generated on Tue Jul 12 2022 14:05:49 by
