1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef MAXAGGREGATOR_H
4 #define MAXAGGREGATOR_H
6 #include "livestatus/table.hpp"
7 #include "livestatus/aggregator.hpp"
15 struct MaxAggregatorState final : public AggregatorState
23 class MaxAggregator final : public Aggregator
26 DECLARE_PTR_TYPEDEFS(MaxAggregator);
28 MaxAggregator(String attr);
30 void Apply(const Table::Ptr& table, const Value& row, AggregatorState **state) override;
31 double GetResultAndFreeState(AggregatorState *state) const override;
36 static MaxAggregatorState *EnsureState(AggregatorState **state);
41 #endif /* MAXAGGREGATOR_H */