24 #include <string_view> 57 virtual size_t fieldCount() const noexcept = 0;
Object used to describe a field (or metric)
SourceBase()
Protected default constructor.
std::vector< std::string > FieldName
Type used for field names (an array of strings)
virtual const std::string fieldNameSourcePrefix() const noexcept=0
Get the prefix by which all field names should begin with.
Namespace for sources of metrics objects and operations.
std::vector< DataValueType >::const_iterator ConstIterator
Const iterator type of MetricsDataArray.
void operator=(const SourceBase &)=delete
Deleted copy operator.
virtual void computeDiff(const Interests &interests, DiffArray::Iterator diff, DataArray::ConstIterator current, DataArray::ConstIterator previous, double factor=1) noexcept=0
Compute the variation (in appropriate unit) of metrics.
virtual void fetchData(const Interests &interests, DataArray::Iterator current)=0
Fetch the latest metrics.
virtual const FieldInfo fieldInfoAtIndex(size_t index) const noexcept=0
Get details about a specific field.
Boolean array to keep track of which fields a source has to fetch metrics for.
~SourceBase()
Protected default destructor.
virtual const std::vector< size_t > indexesOfFieldName(const FieldName &fieldName, Interests *interests=nullptr) const noexcept=0
Search for fields associated to a specific name.
virtual const std::vector< FieldInfo > allFieldsInfo() const noexcept=0
Get all fields details, field which share a common name should appear only once.
Singleton abstract class, base class of all metric sources classes.
std::vector< DataValueType >::iterator Iterator
Iterator type of MetricsDataArray.
virtual size_t fieldCount() const noexcept=0
Get the number of field the source has.