ATLAS Offline Software
|
A class managing bits belonging to a range of bits. More...
#include <BitField.h>
Public Member Functions | |
BitField (unsigned int offset_, unsigned int bits_) | |
constructor, taking the offset (position of the first bit) and the number of bits No range checking is performed so the caller has to ensure that the field does not fall outside the range of the memory of class T Class T must support bit operations More... | |
bool | encode (unsigned int value, T &id) const |
encode a value into id, return false if the value is out of range More... | |
unsigned int | decode (T id) const |
returns the result of decode the input id More... | |
Private Attributes | |
unsigned int | m_offset |
unsigned int | m_bits |
position of the first bit manipulated by the BitField More... | |
unsigned int | m_maxValue |
number of m_bits that the BitField is allowed to manipulate More... | |
unsigned int | m_mask |
maximum allow value More... | |
A class managing bits belonging to a range of bits.
Definition at line 14 of file BitField.h.
BitField::BitField | ( | unsigned int | offset_, |
unsigned int | bits_ | ||
) |
constructor, taking the offset (position of the first bit) and the number of bits No range checking is performed so the caller has to ensure that the field does not fall outside the range of the memory of class T Class T must support bit operations
Definition at line 57 of file BitField.h.
unsigned int BitField::decode | ( | T | id | ) | const |
returns the result of decode the input id
Definition at line 51 of file BitField.h.
bool BitField::encode | ( | unsigned int | value, |
T & | id | ||
) | const |
encode a value into id, return false if the value is out of range
Definition at line 37 of file BitField.h.
|
private |
position of the first bit manipulated by the BitField
Definition at line 31 of file BitField.h.
|
private |
maximum allow value
Definition at line 33 of file BitField.h.
|
private |
number of m_bits that the BitField is allowed to manipulate
Definition at line 32 of file BitField.h.
|
private |
Definition at line 30 of file BitField.h.