LArSoft
v07_13_02
Liquid Argon Software toolkit - http://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 96 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 118 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 120 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 124 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 122 of file BitMask.h.
References util::flags::Flag_t< Storage >::bits.
|
inline |
Definition at line 126 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 93 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>=().