MetroCollect  2.3.4
MetroCollect::MetricsSource::Interests Struct Reference

Boolean array to keep track of which fields a source has to fetch metrics for. More...

#include <SourceInterests.h>

Public Member Functions

 Interests ()
 Construct a new Interests object (each value defaults to false) More...
 
template<typename T >
 Interests (T v)
 Construct a new Interests object. More...
 
template<typename T >
Interestsoperator= (const T v)
 Assigns values to the boolean array. More...
 
bool any () const
 Checks wether any bit is true. More...
 
bool none () const
 Checks wether all bit are false. More...
 
template<typename T >
bool isSet (T index) const
 Checks if a specific bit is true. More...
 
template<typename T >
void set (T index)
 Set a specific bit's value to true. More...
 
template<typename T >
void unSet (T index)
 Set a specific bit's value to false. More...
 
template<>
 Interests (bool v)
 Construct a new Interests object. More...
 
template<>
Interestsoperator= (const bool v)
 Assigns values to the boolean array. More...
 

Public Attributes

uint64_t value
 Boolean array underlying storage. More...
 

Detailed Description

Boolean array to keep track of which fields a source has to fetch metrics for.

Interests

Definition at line 33 of file SourceInterests.h.

Constructor & Destructor Documentation

◆ Interests() [1/3]

MetroCollect::MetricsSource::Interests::Interests ( )
inline

Construct a new Interests object (each value defaults to false)

Definition at line 41 of file SourceInterests.h.

◆ Interests() [2/3]

template<typename T >
MetroCollect::MetricsSource::Interests::Interests ( v)
inline

Construct a new Interests object.

Template Parameters
TInteger-like type to read values from
Parameters
vboolean array values to copy

Definition at line 50 of file SourceInterests.h.

◆ Interests() [3/3]

template<>
MetroCollect::MetricsSource::Interests::Interests ( bool  v)
inline

Construct a new Interests object.

Parameters
vdefault value to copy to all bits

Definition at line 133 of file SourceInterests.h.

Member Function Documentation

◆ any()

bool MetroCollect::MetricsSource::Interests::any ( ) const
inline

Checks wether any bit is true.

Returns
true if any bit is true
false otherwise

Definition at line 73 of file SourceInterests.h.

◆ isSet()

template<typename T >
bool MetroCollect::MetricsSource::Interests::isSet ( index) const
inline

Checks if a specific bit is true.

Template Parameters
TInteger-like index type
Parameters
indexposition of the bit to check
Returns
the specified bit

Definition at line 97 of file SourceInterests.h.

Here is the caller graph for this function:

◆ none()

bool MetroCollect::MetricsSource::Interests::none ( ) const
inline

Checks wether all bit are false.

Returns
true if all bits are false
false otherwise

Definition at line 84 of file SourceInterests.h.

Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename T >
Interests& MetroCollect::MetricsSource::Interests::operator= ( const T  v)
inline

Assigns values to the boolean array.

Template Parameters
TInteger-like type to read values from
Parameters
vboolean array values to copy
Returns
*this

Definition at line 61 of file SourceInterests.h.

◆ operator=() [2/2]

template<>
Interests& MetroCollect::MetricsSource::Interests::operator= ( const bool  v)
inline

Assigns values to the boolean array.

Parameters
vboolean value to copy to each bit
Returns
*this

Definition at line 143 of file SourceInterests.h.

◆ set()

template<typename T >
void MetroCollect::MetricsSource::Interests::set ( index)
inline

Set a specific bit's value to true.

Template Parameters
TInteger-like index type
Parameters
indexposition of the bit to set to true

Definition at line 109 of file SourceInterests.h.

◆ unSet()

template<typename T >
void MetroCollect::MetricsSource::Interests::unSet ( index)
inline

Set a specific bit's value to false.

Template Parameters
TInteger-like index type
Parameters
indexposition of the bit to set to false

Definition at line 121 of file SourceInterests.h.

Member Data Documentation

◆ value

uint64_t MetroCollect::MetricsSource::Interests::value

Boolean array underlying storage.

Definition at line 34 of file SourceInterests.h.


The documentation for this struct was generated from the following file: