1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef AVGAGGREGATOR_H
4 #define AVGAGGREGATOR_H
6 #include "livestatus/table.hpp"
7 #include "livestatus/aggregator.hpp"
15 struct AvgAggregatorState final : public AggregatorState
24 class AvgAggregator final : public Aggregator
27 DECLARE_PTR_TYPEDEFS(AvgAggregator);
29 AvgAggregator(String attr);
31 void Apply(const Table::Ptr& table, const Value& row, AggregatorState **state) override;
32 double GetResultAndFreeState(AggregatorState *state) const override;
37 static AvgAggregatorState *EnsureState(AggregatorState **state);
42 #endif /* AVGAGGREGATOR_H */