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. | |
| const SafeBitConst Loki::SafeBitConst< unique_index, word_t >::operator<< | ( | unsigned int | s | ) | const [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().
| const SafeBitConst Loki::SafeBitConst< unique_index, word_t >::operator| | ( | const SafeBitConst< unique_index, word_t > & | rhs | ) | const [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(), and Loki::SafeBitConst< unique_index, word_t >::word.
1.5.8