Bit field implementation.
More...
template<typename T = uint32_t>
class ABitField< T >
Bit field implementation.
|
| ABitField (T storage=static_cast< T >(0)) |
|
| operator T () |
|
T & | value () |
|
const T & | value () const |
|
ABitField & | operator<< (T flag) |
| Sets flag. More...
|
|
ABitField & | operator>> (T flag) |
| Resets flag. More...
|
|
bool | checkAndSet (T flag) |
| Determines whether flag set or not and resets flag. More...
|
|
bool | checkAndReset (T flag) |
| Determines whether flag set or not and sets flag. More...
|
|
bool | test (T flags) const |
| Determines whether flag (or all flags) set or not. More...
|
|
bool | testAny (T flags) const |
| Determines whether flag (or one of the flags flags) set or not. More...
|
|
bool | operator& (T flags) const |
| Determines whether flag(s) set or not. More...
|
|
void | set (T flag, bool value) |
|
◆ checkAndReset()
template<typename T = uint32_t>
Determines whether flag set or not and sets flag.
- Parameters
-
- Returns
- true if flag was reset
◆ checkAndSet()
template<typename T = uint32_t>
Determines whether flag set or not and resets flag.
- Parameters
-
- Returns
- true if flag was set
◆ operator&()
template<typename T = uint32_t>
bool ABitField< T >::operator& |
( |
T |
flags | ) |
const |
|
inline |
Determines whether flag(s) set or not.
- Parameters
-
- Returns
- true if flag(s) set
- Note
- This function supports multiple flags (i.e
check(FLAG1 | FLAG2)
).
◆ operator<<()
template<typename T = uint32_t>
Sets flag.
- Parameters
-
- Returns
- this
◆ operator>>()
template<typename T = uint32_t>
Resets flag.
- Parameters
-
- Returns
- this
◆ test()
template<typename T = uint32_t>
Determines whether flag (or all flags) set or not.
- Parameters
-
- Returns
- true if flag(s) set
- Note
- This function supports multiple flags (i.e
check(FLAG1 | FLAG2)
).
◆ testAny()
template<typename T = uint32_t>
bool ABitField< T >::testAny |
( |
T |
flags | ) |
const |
|
inline |
Determines whether flag (or one of the flags flags) set or not.
- Parameters
-
- Returns
- true if flag(s) set
- Note
- This function supports multiple flags (i.e
check(FLAG1 | FLAG2)
).
#include <AUI/Util/ABitField.h>
The documentation for this class was generated from the following file: