|
L4Re - L4 Runtime Environment
|
Template for defining typical Flags bitmaps. More...
Collaboration diagram for L4::Types::Flags< BITS_ENUM, UNDERLYING >:Public Types | |
| enum | None_type { None } |
| The none type to get an empty bitmap. More... | |
| typedef UNDERLYING | value_type |
| type of the underlying value | |
| typedef BITS_ENUM | bits_enum_type |
| enum type defining a name for each bit | |
| typedef Flags< BITS_ENUM, UNDERLYING > | type |
| the Flags<> type itself | |
Public Member Functions | |
| Flags (None_type) | |
| Make an empty bitmap. More... | |
| Flags () | |
| Make default Flags. | |
| Flags (BITS_ENUM e) | |
| Make flags from bit name. More... | |
| operator Private_bool * () const | |
Support for if (flags) syntax (test for non-empty flags). | |
| bool | operator! () const |
Support for if (!flags) syntax (test for empty flags). | |
| type & | operator|= (type rhs) |
Support |= of two compatible Flags types. | |
| type & | operator|= (bits_enum_type rhs) |
Support |= of Flags type and bit name. | |
| type & | operator&= (type rhs) |
Support &= of two compatible Flags types. | |
| type & | operator&= (bits_enum_type rhs) |
Support &= of Flags type and bit name. | |
| type | operator~ () const |
Support ~ for Flags types. | |
| type & | clear (bits_enum_type flag) |
| Clear the given flag. More... | |
| value_type | as_value () const |
| Get the underlying value. | |
Static Public Member Functions | |
| static type | from_raw (value_type v) |
| Make flags from a raw value of value_type. More... | |
Friends | |
| type | operator| (type lhs, type rhs) |
Support | of two compatible Flags types. | |
| type | operator| (type lhs, bits_enum_type rhs) |
Support | of Flags type and bit name. | |
| type | operator& (type lhs, type rhs) |
Support & of two compatible Flags types. | |
| type | operator& (type lhs, bits_enum_type rhs) |
Support & of Flags type and bit name. | |
Template for defining typical Flags bitmaps.
| BITS_ENUM | enum type that defines a name for each bit in the bitmap. The values of the enum members must be the number of the bit (not a mask). |
| UNDERLYING | The underlying data type used to represent the bitmap. |
The resulting data type provides a type-safe version that allows bitwise and and or operations with the BITS_ENUM members. As well as, test for 0or !0.
Example:
| enum L4::Types::Flags::None_type |
|
inline |
|
inline |
|
inline |
Clear the given flag.
| flag | The flag that shall be cleared. |
flags.clear(The_flag) is a shortcut for flags &= ~Flags(The_flag).
Definition at line 154 of file types.
References L4::Types::Flags< BITS_ENUM, UNDERLYING >::operator&=().
Here is the call graph for this function:
|
inlinestatic |