L4Re Operating System Framework
Interface and Usage Documentation
|
Definition for a member (part) of a bit field. More...
#include <bitfield>
Data Structures | |
class | Value |
Internal helper type. More... | |
class | Value_base |
Internal helper type. More... | |
class | Value_unshifted |
Internal helper type. More... | |
Public Types | |
enum | { Bits = MSB + 1 - LSB , Lsb = LSB , Msb = MSB } |
enum | Masks : Base_type { Low_mask = static_cast<Base_type>(~0ULL) >> (sizeof(Base_type)*8 - Bits) , Mask = Low_mask << Lsb } |
Masks for bitswise operation on internal parts of a bitfield. More... | |
typedef Best_type< Bits >::Type | Bits_type |
Type to hold at least Bits bits. | |
typedef Best_type< Bits+Lsb >::Type | Shift_type |
Type to hold at least Bits + Lsb bits. | |
typedef Value< Base_type & > | Ref |
Reference type to access the bits inside a raw bit field. | |
typedef Value< Base_type volatile & > | Ref_volatile |
Volatile reference type to access the bits inside a raw bit field. | |
typedef Value< Base_type const > | Val |
Value type to access the bits inside a raw bit field. | |
typedef Value_unshifted< Base_type & > | Ref_unshifted |
Reference type to access the bits inside a raw bit field (in place). | |
typedef Value_unshifted< Base_type volatile & > | Ref_unshifted_volatile |
Volatile reference type to access the bits inside a raw bit field (in place). | |
typedef Value_unshifted< Base_type const > | Val_unshifted |
Value type to access the bits inside a raw bit field (in place). | |
Static Public Member Functions | |
static constexpr Bits_type | get (Shift_type val) |
Get the bits out of val . | |
static constexpr Base_type | get_unshifted (Shift_type val) |
Get the bits in place out of val . | |
static constexpr Base_type | set_dirty (Base_type dest, Shift_type val) |
Set the bits corresponding to val . | |
static constexpr Base_type | set_unshifted_dirty (Base_type dest, Shift_type val) |
Set the bits corresponding to val . | |
static Base_type | set (Base_type dest, Bits_type val) |
Set the bits corresponding to val . | |
static Base_type | set_unshifted (Base_type dest, Shift_type val) |
Set the bits corresponding to val . | |
static constexpr Base_type | val_dirty (Shift_type val) |
Get the shifted bits for val . | |
static constexpr Base_type | val (Bits_type val) |
Get the shifted bits for val . | |
static constexpr Base_type | val_unshifted (Shift_type val) |
Get the shifted bits for val . | |
Definition for a member (part) of a bit field.
T | The underlying type of the bit field. |
LSB | The least significant bit of our bits. |
MSB | The most significant bit of our bits. |
typedef Best_type<Bits>::Type cxx::Bitfield< T, LSB, MSB >::Bits_type |
typedef Best_type<Bits+Lsb>::Type cxx::Bitfield< T, LSB, MSB >::Shift_type |
anonymous enum |
enum cxx::Bitfield::Masks : Base_type |
|
inlinestaticconstexpr |
Get the bits out of val
.
val | The raw value of the whole bit field. |
Definition at line 110 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Low_mask, cxx::Bitfield< T, LSB, MSB >::Lsb, and cxx::Bitfield< T, LSB, MSB >::val().
|
inlinestaticconstexpr |
Get the bits in place out of val
.
val | The raw value of the whole bit field. |
This means other bits are masked out, however the result is not shifted to the right.
Definition at line 123 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Mask, and cxx::Bitfield< T, LSB, MSB >::val().
|
inlinestatic |
Set the bits corresponding to val
.
dest | The current value of the whole bit field. |
val | The value to set into the bits. |
Definition at line 172 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Low_mask, cxx::Bitfield< T, LSB, MSB >::set_dirty(), and cxx::Bitfield< T, LSB, MSB >::val().
|
inlinestaticconstexpr |
Set the bits corresponding to val
.
dest | The current value of the whole bit field. |
val | The value to set into the bits. |
val
must not contain more than Bits bits.val
to the right number of bits. Definition at line 138 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Lsb, cxx::Bitfield< T, LSB, MSB >::Mask, and cxx::Bitfield< T, LSB, MSB >::val().
Referenced by cxx::Bitfield< T, LSB, MSB >::set().
|
inlinestatic |
Set the bits corresponding to val
.
dest | The current value of the whole bit field. |
val | The value shifted Lsb bits to the left that shall be set into the bit field. |
Definition at line 184 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Mask, cxx::Bitfield< T, LSB, MSB >::set_unshifted_dirty(), and cxx::Bitfield< T, LSB, MSB >::val().
|
inlinestaticconstexpr |
Set the bits corresponding to val
.
dest | The current value of the whole bit field. |
val | The value shifted Lsb bits to the left that shall be set into the bits. |
val
to the right number of bits. Definition at line 158 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Mask, and cxx::Bitfield< T, LSB, MSB >::val().
Referenced by cxx::Bitfield< T, LSB, MSB >::set_unshifted().
|
inlinestaticconstexpr |
Get the shifted bits for val
.
val | The value to set into the bits. |
Definition at line 207 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Low_mask, cxx::Bitfield< T, LSB, MSB >::val(), and cxx::Bitfield< T, LSB, MSB >::val_dirty().
Referenced by cxx::Bitfield< T, LSB, MSB >::get(), cxx::Bitfield< T, LSB, MSB >::get_unshifted(), cxx::Bitfield< T, LSB, MSB >::set(), cxx::Bitfield< T, LSB, MSB >::set_dirty(), cxx::Bitfield< T, LSB, MSB >::set_unshifted(), cxx::Bitfield< T, LSB, MSB >::set_unshifted_dirty(), cxx::Bitfield< T, LSB, MSB >::val(), cxx::Bitfield< T, LSB, MSB >::val_dirty(), and cxx::Bitfield< T, LSB, MSB >::val_unshifted().
|
inlinestaticconstexpr |
Get the shifted bits for val
.
val | The value to set into the bits. |
val
must not contain more than Bits bits.val
to the right number of bits. Definition at line 198 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Lsb, and cxx::Bitfield< T, LSB, MSB >::val().
Referenced by cxx::Bitfield< T, LSB, MSB >::val().
|
inlinestaticconstexpr |
Get the shifted bits for val
.
val | The value shifted Lsb bits to the left that shall be set into the bits. |
Definition at line 217 of file bitfield.
References cxx::Bitfield< T, LSB, MSB >::Mask, and cxx::Bitfield< T, LSB, MSB >::val().