|
Loki
0.1.7
|
Public Types | |
| typedef word_t | bit_word_t |
| Type of the bit field is available if needed. | |
| typedef SafeBitField< unique_index, word_t > | field_t |
| Corresponding field type. | |
Public Member Functions | |
| SafeBitConst () | |
| Default constructor allows client code to construct bit fields on the stack. | |
| SafeBitConst (const SafeBitConst &rhs) | |
| Copy constructor. | |
| bool | operator== (const SafeBitConst &rhs) const |
| Comparison operators which take a constant bit value. | |
| bool | operator== (const field_t &rhs) const |
| Comparision operators for mutable bit fields. | |
| const SafeBitConst | operator| (const SafeBitConst &rhs) const |
| field_t | operator| (const field_t &rhs) const |
| These bitwise operators return a bit-field instead of a bit-const. | |
| const SafeBitConst | operator<< (unsigned int s) const |
Static Public Member Functions | |
| static size_t | size () |
| Word size is also the maximum number of different bit fields for a given word type. | |
Friends | |
| class | SafeBitField< unique_index, word_t > |
| Typedef is not allowed in friendship declaration. | |
This class defines a bit-field constant - a collection of unchanging bits used to compare to bit-fields. Instances of this class are intended to act as labels for bit-fields.
This class defines a bit-field constant - a collection of unchanging bits used to compare to bit-fields. Instances of this class are intended to store bit values.
|
inline |
The shift operators move bits inside the bit field. These are useful in loops which act over bit fields and increment them.
References Loki::SafeBitConst< unique_index, word_t >::SafeBitConst().
Referenced by Loki::SafeBitField< unique_index, word_t >::operator|().

|
inline |
Bitwise operations. Operation-assignment operators are not needed, since bit constants cannot be changed after they are initialized.
References Loki::SafeBitConst< unique_index, word_t >::SafeBitConst().
Referenced by Loki::SafeBitField< unique_index, word_t >::operator|(), and Loki::SafeBitConst< unique_index, word_t >::size().
