BitSet.h
Go to the documentation of this file.
49 static_assert(std::is_enum<E>::value || (std::is_integral<E>::value && std::is_unsigned<E>::value),
87 template <typename S2> constexpr BitSet(const BitSet<S2, E>& bitset) : bitSetValue(bitset.value())
403 inline constexpr BitSet<S, E, size_> operator&(const BitSet<S, E, size_>& x, const BitSet<S, E, size_>& y)
421 inline constexpr BitSet<S, E, size_> operator+(const BitSet<S, E, size_>& x, const BitSet<S, E, size_>& y)
427 inline constexpr BitSet<S, E, size_> operator-(const BitSet<S, E, size_>& x, const BitSet<S, E, size_>& y)
467 typename std::enable_if<std::is_enum<E>::value && !std::is_convertible<E, int>::value, BitSet<uint32_t, E>>::type
475 typename std::enable_if<std::is_enum<E>::value && !std::is_convertible<E, int>::value, BitSet<uint32_t, E>>::type
481 template <typename T> typename std::enable_if<std::is_integral<T>::value, String>::type toString(T value)
std::enable_if< std::is_integral< T >::value, String >::type toString(T value)
Definition: BitSet.h:481
constexpr BitSet< S, E, size_ > operator+(const BitSet< S, E, size_ > &x, const BitSet< S, E, size_ > &y)
Definition: BitSet.h:421
constexpr BitSet< S, E, size_ > operator-(const BitSet< S, E, size_ > &x, const BitSet< S, E, size_ > &y)
Definition: BitSet.h:427
constexpr BitSet< S, E, size_ > operator|(BitSet< S, E, size_ > x, BitSet< S, E, size_ > y)
Definition: BitSet.h:409
constexpr BitSet< S, E, size_ > operator&(const BitSet< S, E, size_ > &x, const BitSet< S, E, size_ > &y)
Definition: BitSet.h:403
constexpr BitSet< S, E, size_ > operator^(BitSet< S, E, size_ > x, BitSet< S, E, size_ > y)
Definition: BitSet.h:445
Definition: BitSet.h:55
BitSet & reset(E e)
Clear the state of the given bit (i.e. remove it from the set)
Definition: BitSet.h:325
BitSet & operator|=(const BitSet &rhs)
Union: Add elements to set.
Definition: BitSet.h:211
BitSet & operator&=(const BitSet &rhs)
Intersection: Leave only elements common to both sets.
Definition: BitSet.h:202
bool operator==(E e) const
Determine if set consists of only the one given element.
Definition: BitSet.h:333
constexpr BitSet(const BitSet< S2, E > &bitset)
Copy constructor.
Definition: BitSet.h:87
BitSet & operator^=(const BitSet &rhs)
XOR - toggle state of bits using another set.
Definition: BitSet.h:220
size_t printTo(Print &p, const String &separator=", ") const
Class template to print the contents of a BitSet to a String.
Definition: BitSet.h:374
static constexpr S bitVal(E e)
Get the bitmask corresponding to a given value.
Definition: BitSet.h:150
static constexpr size_t size()
Get the number of possible elements in the set.
Definition: BitSet.h:134
bool any(const BitSet &other) const
Determine if set contains any values from another set i.e. intersection != [].
Definition: BitSet.h:268
size_t count() const
Get the number of elements in the set, i.e. bits set to 1.
Definition: BitSet.h:176
BitSet & operator+=(const BitSet &rhs)
Union: Add elements to set.
Definition: BitSet.h:184
constexpr BitSet operator~() const
Obtain a set containing all elements not in this one.
Definition: BitSet.h:126
bool operator==(const BitSet &other) const
Compare this set with another for equality.
Definition: BitSet.h:110
static constexpr BitSet domain()
Get the set of all possible values.
Definition: BitSet.h:142
BitSet & operator-=(const BitSet &rhs)
Remove elements from set.
Definition: BitSet.h:193
BitSet & set(E e, bool state=true)
Set the state of the given bit (i.e. add to or remove from the set)
Definition: BitSet.h:303
bool operator!=(const BitSet &other) const
Compare this set with another for inequality.
Definition: BitSet.h:118
size_t length(void) const
Obtain the String length in characters, excluding NUL terminator.
Definition: WString.h:243