FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fl::BitsetInlined< N > Class Template Reference

Detailed Description

template<uint32_t N = 256>
class fl::BitsetInlined< N >

A Bitset implementation with inline storage that can grow if needed.

T is the storage type (uint8_t, uint16_t, uint32_t, uint64_t) N is the initial number of bits to store inline

Definition at line 225 of file bitset.h.

#include <bitset.h>

+ Inheritance diagram for fl::BitsetInlined< N >:
+ Collaboration diagram for fl::BitsetInlined< N >:

Classes

struct  Proxy
 

Public Member Functions

 BitsetInlined ()
 Constructs a Bitset with all bits reset.
 
 BitsetInlined (BitsetInlined &&other) noexcept
 
 BitsetInlined (const BitsetInlined &other)
 
 BitsetInlined (size_t size)
 
bool all () const noexcept
 
bool any () const noexcept
 Queries.
 
void assign (size_t n, bool value)
 
uint32_t count () const noexcept
 Returns the number of set bits.
 
BitsetInlinedflip () noexcept
 Flips all bits.
 
BitsetInlinedflip (uint32_t pos)
 Flips (toggles) the bit at position pos.
 
bool none () const noexcept
 
BitsetInlinedoperator= (BitsetInlined &&other) noexcept
 
BitsetInlinedoperator= (const BitsetInlined &other)
 
Proxy operator[] (uint32_t pos)
 
bool operator[] (uint32_t pos) const noexcept
 Returns the value of the bit at position pos.
 
void reset () noexcept
 Resets all bits to zero.
 
BitsetInlinedreset (uint32_t pos)
 Clears the bit at position pos.
 
void resize (uint32_t new_size)
 Resizes the Bitset if needed.
 
BitsetInlinedset (uint32_t pos, bool value=true)
 Sets or clears the bit at position pos.
 
uint32_t size () const noexcept
 Size of the Bitset (number of bits).
 
bool test (uint32_t pos) const noexcept
 Tests whether the bit at position pos is set.
 

Private Types

using fixed_bitset = BitsetFixed<N>
 

Private Attributes

Variant< fixed_bitset, bitset_dynamic_storage
 

Friends

BitsetInlined operator& (const BitsetInlined &lhs, const BitsetInlined &rhs) noexcept
 
BitsetInlined operator^ (const BitsetInlined &lhs, const BitsetInlined &rhs) noexcept
 
BitsetInlined operator| (const BitsetInlined &lhs, const BitsetInlined &rhs) noexcept
 
BitsetInlined operator~ (const BitsetInlined &bs) noexcept
 Bitwise operators.
 

The documentation for this class was generated from the following file: