1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef COUNTAGGREGATOR_H
4 #define COUNTAGGREGATOR_H
6 #include "livestatus/table.hpp"
7 #include "livestatus/aggregator.hpp"
15 struct CountAggregatorState final : public AggregatorState
23 class CountAggregator final : public Aggregator
26 DECLARE_PTR_TYPEDEFS(CountAggregator);
28 void Apply(const Table::Ptr& table, const Value& row, AggregatorState **) override;
29 double GetResultAndFreeState(AggregatorState *state) const override;
32 static CountAggregatorState *EnsureState(AggregatorState **state);
37 #endif /* COUNTAGGREGATOR_H */