73 inline bool any()
const {
97 inline bool isSet(T index)
const {
98 return (
value & (static_cast<size_t>(1) << (index % (8 *
sizeof(
size_t))))) != 0;
109 inline void set(T index) {
110 value |= (
static_cast<size_t>(1) << (index % (8 *
sizeof(
size_t))));
122 value &= ~(
static_cast<size_t>(1) << (index % (8 *
sizeof(
size_t))));
144 value = (v ? ~0 : 0);
Interests(T v)
Construct a new Interests object.
std::shared_ptr< std::vector< MetricsSource::Interests > > SourceInterests
Type used to store and share interests of multiple sources.
Namespace for sources of metrics objects and operations.
Interests & operator=(const T v)
Assigns values to the boolean array.
uint64_t value
Boolean array underlying storage.
Interests()
Construct a new Interests object (each value defaults to false)
void unSet(T index)
Set a specific bit's value to false.
SourceInterests makeSourceInterests(bool value)
Construct a new shared pointer to a SourceInterests object.
bool none() const
Checks wether all bit are false.
Boolean array to keep track of which fields a source has to fetch metrics for.
bool any() const
Checks wether any bit is true.
bool isSet(T index) const
Checks if a specific bit is true.