Loading...
Searching...
No Matches
etl::bitset_ext< 0U, unsigned char > Class Reference

Specialisation for zero bits. More...

`#include <bitset_new.h>`

## Public Types

typedef size_t | size_type
typedef etl::private_bitset::bitset_common< 0U, unsignedchar >::element_type | element_type
typedef etl::private_bitset::bitset_common< 0U, unsignedchar >::span_type | span_type
typedef etl::private_bitset::bitset_common< 0U, unsignedchar >::const_span_type | const_span_type
typedef etl::array< unsigned char, Number_Of_Elements > | buffer_type
Public Types inherited from etl::private_bitset::bitset_common< Active_Bits, TElement >
typedef etl::private_bitset::bitset_impl_common< TElement >::element_type | element_type
typedef etl::span< element_type, Number_Of_Elements > | span_type
typedef etl::span< const element_type, Number_Of_Elements > | const_span_type
Public Types inherited from etl::private_bitset::bitset_impl_common< TElement >
typedef TElement | element_type
typedef TElement * | pointer
typedef const TElement * | const_pointer
typedef size_t | size_type
Public Types inherited from etl::private_bitset::bitset_common< 0U, unsigned char >
typedef etl::private_bitset::bitset_impl_common< unsigned char >::element_type | element_type
typedef etl::span< element_type, Number_Of_Elements > | span_type
typedef etl::span< const element_type, Number_Of_Elements > | const_span_type
Public Types inherited from etl::private_bitset::bitset_impl_common< unsigned char >
typedef unsigned char | element_type
typedef unsigned char * | pointer
typedef const unsigned char * | const_pointer
typedef size_t | size_type

## Public Member Functions

| ETL_STATIC_ASSERT (etl::is_unsigned< unsigned char >::value, "The element type must be unsigned")
ETL_CONSTEXPR14 | bitset_ext (element_type *pbuffer_)
| Default constructor.
ETL_CONSTEXPR14 bitset_ext & | operator= (const bitset_ext< Active_Bits, unsigned char > &other) ETL_NOEXCEPT
| Assignment operator.
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | set () ETL_NOEXCEPT
| Set all of the bits.
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | from_string (const char *text) ETL_NOEXCEPT
| Set from a string.
ETL_CONSTEXPR14 T | value () const ETL_NOEXCEPT
| Get as an integral value.
ETL_CONSTEXPR14 T | extract (size_t position, size_t length=etl::integral_limits< T >::bits)
unsigned long | to_ulong () const
| Get as an unsigned long.
unsigned long long | to_ullong () const
| Get as an unsigned long long.
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | reset () ETL_NOEXCEPT
| Reset all of the bits.
ETL_CONSTEXPR14 bool | test (size_t position) const
ETL_CONSTEXPR14 size_t | count () const ETL_NOEXCEPT
| Count the number of bits set.
ETL_CONSTEXPR14 bool | all () const ETL_NOEXCEPT
ETL_CONSTEXPR14 bool | none () const ETL_NOEXCEPT
| Are none of the bits set?
ETL_CONSTEXPR14 bool | any () const ETL_NOEXCEPT
| Are any of the bits set?
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | flip () ETL_NOEXCEPT
| Flip all of the bits.
ETL_CONSTEXPR14 bool | operator[] (size_t position) const ETL_NOEXCEPT
| Read [] operator.
ETL_CONSTEXPR14 TString | to_string (typename TString::value_type zero=typename TString::value_type( '0'), typename TString::value_type one=typename TString::value_type( '1')) const
| Returns a string representing the bitset.
ETL_CONSTEXPR14 size_t | find_first (bool state) const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_t | find_next (bool state, size_t position) const ETL_NOEXCEPT
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | operator&= (const bitset_ext< Active_Bits, unsigned char > &other) ETL_NOEXCEPT
| operator &=
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | operator|= (const bitset_ext< Active_Bits, unsigned char > &other) ETL_NOEXCEPT
| operator |=
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | operator^= (const bitset_ext< Active_Bits, unsigned char > &other) ETL_NOEXCEPT
| operator ^=
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | operator<<= (size_t shift) ETL_NOEXCEPT
| operator <<=
ETL_CONSTEXPR14 bitset_ext< Active_Bits, unsigned char > & | operator>>= (size_t shift) ETL_NOEXCEPT
| operator >>=
ETL_CONSTEXPR14 void | swap (etl::bitset_ext< Active_Bits, unsigned char > &other) ETL_NOEXCEPT
| swap
ETL_CONSTEXPR14 span_type | span () ETL_NOEXCEPT

## Static Public Member Functions

static ETL_CONSTEXPR size_t | size () ETL_NOEXCEPT
| The number of bits in the bitset.
static ETL_CONSTEXPR size_t | number_of_elements () ETL_NOEXCEPT
| The number of storage elements in the bitset.
static ETL_CONSTEXPR element_type | all_set_element () ETL_NOEXCEPT
| The value of a set element.
static ETL_CONSTEXPR element_type | all_clear_element () ETL_NOEXCEPT
| The value of a clear element.
static ETL_CONSTEXPR element_type | top_mask () ETL_NOEXCEPT
| The mask for the msb element.
static ETL_CONSTEXPR size_t | bits_per_element () ETL_NOEXCEPT
| The number of bits in an element.
static ETL_CONSTEXPR size_t | allocated_bits () ETL_NOEXCEPT
| The total number of bits of storage, including unused.
static ETL_CONSTEXPR etl::bitset_storage_model | storage_model () ETL_NOEXCEPT

## Friends

ETL_CONSTEXPR14 bool | operator== (const bitset_ext< Active_Bits, unsigned char > &lhs, const bitset_ext< Active_Bits, unsigned char > &rhs) ETL_NOEXCEPT
| operator ==
ETL_CONSTEXPR14 bool | operator!= (const bitset_ext< Active_Bits, unsigned char > &lhs, const bitset_ext< Active_Bits, unsigned char > &rhs)
| operator !=

## Additional Inherited Members

Static Public Attributes inherited from etl::private_bitset::bitset_common< Active_Bits, TElement >
static ETL_CONSTANT size_t | Number_Of_Elements
static ETL_CONSTANT size_t | Size = Active_Bits
static ETL_CONSTANT size_t | Allocated_Bits = Number_Of_Elements * Bits_Per_Element
static ETL_CONSTANT etl::bitset_storage_model | Storage_Model
static ETL_CONSTANT TElement | Top_Mask = element_type(Top_Mask_Shift == 0 ? All_Set_Element : ~(All_Set_Element << Top_Mask_Shift))
Static Public Attributes inherited from etl::private_bitset::bitset_impl_common< TElement >
static ETL_CONSTANT size_t | npos = etl::integral_limits<size_t>::max
static ETL_CONSTANT size_t | Bits_Per_Element = etl::integral_limits<TElement>::bits
static ETL_CONSTANT TElement | All_Set_Element = etl::integral_limits<TElement>::max
static ETL_CONSTANT TElement | All_Clear_Element = element_type(0)
Static Public Attributes inherited from etl::private_bitset::bitset_common< 0U, unsigned char >
static ETL_CONSTANT size_t | Number_Of_Elements
static ETL_CONSTANT size_t | Size
static ETL_CONSTANT size_t | Allocated_Bits
static ETL_CONSTANT etl::bitset_storage_model | Storage_Model
static ETL_CONSTANT unsigned char | Top_Mask
Static Public Attributes inherited from etl::private_bitset::bitset_impl_common< unsigned char >
static ETL_CONSTANT size_t | npos
static ETL_CONSTANT size_t | Bits_Per_Element
static ETL_CONSTANT unsigned char | All_Set_Element
static ETL_CONSTANT unsigned char | All_Clear_Element

## Detailed Description

Specialisation for zero bits.

## Member Function Documentation

## extract()

ETL_CONSTEXPR14 T etl::bitset_ext< Active_Bits, unsigned char >::extract | ( | size_t | position,
|  | size_t | length = etl::integral_limits<T>::bits )

inline

Extract an integral value from an arbitrary position and length. Run time position and length.

## find_first()

ETL_CONSTEXPR14 size_t etl::bitset_ext< Active_Bits, unsigned char >::find_first | ( | bool | state | ) | const

inline

Finds the first bit in the specified state.

Parameters

  state | The state to search for.

Returns
  The position of the bit or npos if none were found.

## find_next()

ETL_CONSTEXPR14 size_t etl::bitset_ext< Active_Bits, unsigned char >::find_next | ( | bool | state,
|  | size_t | position ) const

inline

Finds the next bit in the specified state.

Parameters

  state | The state to search for.
  position | The position to start from.

Returns
  The position of the bit or npos if none were found.

## span()

ETL_CONSTEXPR14 span_type etl::bitset_ext< Active_Bits, unsigned char >::span | ( |  | ) |

inline

span Returns a span of the underlying pbuffer.

## storage_model()

ETL_CONSTEXPR etl::bitset_storage_model etl::bitset_ext< Active_Bits, unsigned char >::storage_model | ( |  | ) |

inline static

The storage model for the bitset. etl::bitset_storage_model::Single etl::bitset_storage_model::Multi

## test()

ETL_CONSTEXPR14 bool etl::bitset_ext< Active_Bits, unsigned char >::test | ( | size_t | position | ) | const

inline

Tests a bit at a position. Positions greater than the number of configured bits will return false.

## Friends And Related Symbol Documentation

## operator!=

ETL_CONSTEXPR14 bool operator!= | ( | const bitset_ext< Active_Bits, unsigned char > & | lhs,
|  | const bitset_ext< Active_Bits, unsigned char > & | rhs )

friend

operator !=

operator !=

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

- include/etl/private/bitset_new.h