#include <BitField.h>
|
enum | { BITS = BV::BITS,
START = IDX,
LENGTH = LEN,
END = START + LENGTH
} |
|
enum | { BITFIELD_ERROR_OVERFLOWED_BITS = (END+1)/((BITS+1)/(END+1))
} |
|
enum | { BITFIELD_ERROR_FIELD_TOO_LONG = (LENGTH+1)/((64+1)/(LENGTH+1))
} |
|
typedef VTypeToType< VT >::TYPE | VTYPE |
|
|
static u32 | Read (const BV &bv) |
|
static void | Write (BV &bv, u32 val) |
|
static u64 | ReadLong (const BV &bv) |
|
static void | SetBit (BV &bv, u32 bitnum) |
|
template<class CC > |
static void | SetBit (Atom< CC > &atom, u32 bitnum) |
|
static void | ClearBit (BV &bv, u32 bitnum) |
|
template<class CC > |
static void | ClearBit (Atom< CC > &atom, u32 bitnum) |
|
static void | ToggleBit (BV &bv, u32 bitnum) |
|
template<class CC > |
static void | ToggleBit (Atom< CC > &atom, u32 bitnum) |
|
static bool | ReadBit (const BV &bv, u32 bitnum) |
|
template<class CC > |
static bool | ReadBit (const Atom< CC > &atom, u32 bitnum) |
|
static void | WriteLong (BV &bv, u64 val) |
|
template<class CC > |
static u32 | Read (const Atom< CC > &atom) |
|
template<class CC > |
static void | Write (Atom< CC > &atom, u32 val) |
|
template<class CC > |
static void | Load (const Atom< CC > &atom, u32 &val) |
|
template<class CC > |
static void | Store (Atom< CC > &atom, const u32 &val) |
|
template<class CC > |
static void | Load (const Atom< CC > &atom, s32 &val) |
|
template<class CC > |
static void | Store (Atom< CC > &atom, const s32 &val) |
|
template<class CC > |
static void | Load (const Atom< CC > &atom, bool &val) |
|
template<class CC > |
static void | Store (Atom< CC > &atom, const bool &val) |
|
template<class CC > |
static void | Load (const Atom< CC > &atom, u64 &val) |
|
template<class CC > |
static void | Store (Atom< CC > &atom, const u64 &val) |
|
template<class CC > |
static VTYPE | GetValue (const Atom< CC > &a) |
|
template<class CC > |
static void | SetValue (Atom< CC > &a, VTYPE val) |
|
template<class BV, VD::Type, u32, u32>
class MFM::BitField< BV, Type, u32, u32 >
A field of up to 32 contiguous bits (64 for VD::BITS) of a BitVector, interpreted as some type VD:::Type
template<class BV , VD::Type , u32 , u32 >
static void MFM::BitField< BV, Type, u32, u32 >::ClearBit |
( |
BV & |
bv, |
|
|
u32 |
bitnum |
|
) |
| |
|
inlinestatic |
Clears bit bitnum within this BitField (with bitnum 0 meaning the leftmost bit of this field).
- Parameters
-
bv | The BV to alter. |
bitnum | The number of the bit to clear. |
template<class BV , VD::Type , u32 , u32 >
static u32 MFM::BitField< BV, Type, u32, u32 >::Read |
( |
const BV & |
bv | ) |
|
|
inlinestatic |
Reads the contents of a window (which is represented by this BitField) from a specified BV into a u32.
- Parameters
-
bv | The BV to read bits from. |
- Returns
- the bits inside the window specified by this BitField which reside in bv.
template<class BV , VD::Type , u32 , u32 >
static bool MFM::BitField< BV, Type, u32, u32 >::ReadBit |
( |
const BV & |
bv, |
|
|
u32 |
bitnum |
|
) |
| |
|
inlinestatic |
Read bit bitnum within this BitField (with bitnum 0 meaning the leftmost bit of this field).
- Parameters
-
bv | The BV to examine. |
bitnum | The number of the bit to read |
- Returns
- true if bit bitnum is set in bv
template<class BV , VD::Type , u32 , u32 >
static u64 MFM::BitField< BV, Type, u32, u32 >::ReadLong |
( |
const BV & |
bv | ) |
|
|
inlinestatic |
Reads the contents of a window (which is represented by this BitField) from a specified BV into a u64.
- Parameters
-
bv | The BV to read bits from. |
- Returns
- the bits inside the window specified by this BitField which reside in bv.
template<class BV , VD::Type , u32 , u32 >
static void MFM::BitField< BV, Type, u32, u32 >::SetBit |
( |
BV & |
bv, |
|
|
u32 |
bitnum |
|
) |
| |
|
inlinestatic |
Sets bit bitnum within this BitField (with bitnum 0 meaning the leftmost bit of this field).
- Parameters
-
bv | The BV to alter. |
bitnum | The number of the bit to set. |
template<class BV , VD::Type , u32 , u32 >
static void MFM::BitField< BV, Type, u32, u32 >::ToggleBit |
( |
BV & |
bv, |
|
|
u32 |
bitnum |
|
) |
| |
|
inlinestatic |
Toggles bit bitnum within this BitField (with bitnum 0 meaning the leftmost bit of this field).
- Parameters
-
bv | The BV to alter. |
bitnum | The number of the bit to toggle. |
template<class BV , VD::Type , u32 , u32 >
static void MFM::BitField< BV, Type, u32, u32 >::Write |
( |
BV & |
bv, |
|
|
u32 |
val |
|
) |
| |
|
inlinestatic |
writes the contents of a u32 into a window (which is represented by this BitField) of a specified BV.
- Parameters
-
bv | The BV to write bits to. |
template<class BV , VD::Type , u32 , u32 >
static void MFM::BitField< BV, Type, u32, u32 >::WriteLong |
( |
BV & |
bv, |
|
|
u64 |
val |
|
) |
| |
|
inlinestatic |
writes the contents of a u64 into a window (which is represented by this BitField) of a specified BV.
- Parameters
-
bv | The BV to write bits to. |
The documentation for this class was generated from the following files: