11 constexpr
unsigned long long value(
const Flag_t &flag ) ;
16 static constexpr std::size_t AmtFlags = 8 ;
22 explicit constexpr
Flag_t(
unsigned long long val )
23 : _val{val}, _initValue{val} {}
28 explicit Flag_t(
const std::bitset< AmtFlags > &val ) : _val{val} {}
55 explicit operator bool()
const {
return _val.any(); }
60 explicit operator const std::bitset< AmtFlags > &()
const {
return _val; }
81 explicit operator unsigned long long()
const {
return _val.to_ullong(); }
97 std::bitset< AmtFlags > _val{0} ;
98 const unsigned long long _initValue{0} ;
99 friend constexpr
unsigned long long constexpr Flag_t MemoryLayout(Flags::value(Flags::Book::Single)|Flags::value(Flags::Book::MultiShared)|Flags::value(Flags::Book::MultiCopy))
Mask for Flags with memory layout options.
constexpr Flag_t(unsigned long long val)
constructor flag from number.
Flag_t operator|(const Flag_t &f) const
logical OR on tow set of Flags.
constexpr Flag_t StoreOptions(Flags::Book::Store)
Mask for Flags with store option.
bool operator==(const Flag_t &f) const
check for equality.
constexpr unsigned long long value(const Flag_t &flag)
Flag_t & operator=(Flag_t &&flag) noexcept
Flag_t(const std::bitset< AmtFlags > &val)
Construct flag from bitset.
constexpr Flag_t Store(1U<< 3U)
store object in file at end of lifetime
Flag type for flags in marlinmt::book.
const unsigned long long _initValue
constexpr Flag_t MultiShared(1U<< 1U)
create one instance witch concurrent access.
Flag_t operator~() const
bitwise not for Flags
bool operator!=(const Flag_t &f) const
check for inequality.
bool contains(const Flag_t &f) const
check if the flags is a subset of the other.
std::bitset< AmtFlags > _val
flags saved as bits
constexpr Flag_t MultiCopy(1U<< 2U)
create multiple instances of booked object (if possible) to avoid sync points
constexpr Flag_t Default(0)
use default arguments
Flag_t & operator=(const Flag_t &flag)
constexpr Flag_t Single(1U<< 0U)
vanilla object.