LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Type identifying a flag. Operations are implemented as free functions. More...
#include "BitMask.h"
Public Types | |
using | Storage_t = Storage |
using | This_t = Flag_t< Storage > |
This type. More... | |
Public Member Functions | |
constexpr | Flag_t (Index_t flagIndex) |
Constructs from the flag index. More... | |
constexpr Index_t | index () const |
Returns the index of the (first) bit set. More... | |
constexpr Flag_t | copy () const |
Returns a copy of this object. More... | |
Comparison operators for flags | |
constexpr bool | operator== (This_t other) const |
constexpr bool | operator!= (This_t other) const |
constexpr bool | operator< (This_t other) const |
constexpr bool | operator> (This_t other) const |
constexpr bool | operator<= (This_t other) const |
constexpr bool | operator>= (This_t other) const |
Public Attributes | |
Storage_t | bits |
The bits representing this flag (only one is set) More... | |
Type identifying a flag. Operations are implemented as free functions.
using util::flags::Flag_t< Storage >::Storage_t = Storage |
using util::flags::Flag_t< Storage >::This_t = Flag_t<Storage> |
|
inline |
Constructs from the flag index.
Definition at line 95 of file BitMask.h.
|
inline |
Returns a copy of this object.
When a flag is declared as constexpr
, functions trying to take its address will trigger a link failure (as there is no address for a constexpr). Passing a copy of it should fix the problem.
constexpr Index_t util::flags::Flag_t< Storage >::index | ( | ) | const |
Returns the index of the (first) bit set.
Referenced by util::flags::operator!=(), util::flags::operator==(), util::flags::operator>(), util::flags::operator>=(), and util::flags::to_string().
|
inline |
Definition at line 114 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 115 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 117 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 113 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 116 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 118 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
Storage_t util::flags::Flag_t< Storage >::bits |
The bits representing this flag (only one is set)
Definition at line 92 of file BitMask.h.
Referenced by util::flags::Flag_t< Storage >::operator!=(), util::flags::Flag_t< Storage >::operator<(), util::flags::Flag_t< Storage >::operator<=(), util::flags::Flag_t< Storage >::operator==(), util::flags::Flag_t< Storage >::operator>(), and util::flags::Flag_t< Storage >::operator>=().