|
Embedded Template Library
1.0
|
#include <bitset.h>
Classes | |
| class | bit_reference |
| The reference type returned. More... | |
| class | const_iterator |
| The const_iterator type. More... | |
| class | iterator |
| The iterator type. More... | |
Public Member Functions | |
| bitset () | |
| Default constructor. | |
| bitset (const bitset< N > &other) | |
| Copy constructor. | |
| bitset (unsigned long long value) | |
| Construct from a value. | |
| bitset (const char *text) | |
| Construct from a string. | |
| bitset< N > & | set () |
| Set all of the bits. | |
| bitset< N > & | set (size_t position, bool value=true) |
| Set the bit at the position. | |
| bitset< N > & | set (const char *text) |
| Set from a string. | |
| bitset< N > & | reset () |
| Reset all of the bits. | |
| bitset< N > & | reset (size_t position) |
| Reset the bit at the position. | |
| bitset< N > & | flip () |
| Flip all of the bits. | |
| bitset< N > & | flip (size_t position) |
| Flip the bit at the position. | |
| bool | operator[] (size_t position) const |
| Read [] operator. | |
| bit_reference | operator[] (size_t position) |
| Write [] operator. | |
| bool | test (size_t position) const |
| bool | all () const |
| bool | any () const |
| Are any of the bits set? | |
| bool | none () const |
| Are none of th bits set? | |
| size_t | count () const |
| Count the number of bits set. | |
| size_t | size () const |
| The size of the bitset. | |
| size_t | find_first (bool state) const |
| size_t | find_next (bool state, size_t position) const |
| bitset< N > & | operator&= (const bitset< N > &other) |
| operator &= | |
| bitset< N > & | operator|= (const bitset< N > &other) |
| operator |= | |
| bitset< N > & | operator^= (const bitset< N > &other) |
| operator ^= | |
| bitset< N > | operator~ () const |
| operator ~ | |
| bitset< N > | operator<< (size_t shift) const |
| operator << | |
| bitset< N > & | operator<<= (size_t shift) |
| operator <<= | |
| bitset< N > | operator>> (size_t shift) const |
| operator >> | |
| bitset< N > & | operator>>= (size_t shift) |
| operator >>= | |
| void | swap (bitset< N > &other) |
| swap | |
| iterator | begin () |
| begin | |
| const_iterator | begin () const |
| begin | |
| const_iterator | cbegin () |
| cbegin | |
| iterator | end () |
| end | |
| const_iterator | end () const |
| end | |
| const_iterator | cend () |
| cend | |
Public Member Functions inherited from etl::ibitset | |
| ibitset () | |
| Default constructor. | |
| virtual | ~ibitset () |
| Destructor. | |
Friends | |
| bool | operator== (const bitset< N > &lhs, const bitset< N > &rhs) |
| operator == | |
The class emulates an array of bool elements, but optimized for space allocation. Will accomodate any number of bits. Does not use std::string.
| N | The number of bits. |
|
inlinevirtual |
Finds the first bit in the specified state.
| state | The state to search for. |
Implements etl::ibitset.
|
inline |
Finds the next bit in the specified state.
| state | The state to search for. |
| position | The position to start from. |
|
inline |
Tests a bit at a position. Positions greater than the number of configured bits will return false.