2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2013-03-10 15:11:32 +01:00
|
|
|
|
2014-05-25 16:23:35 +02:00
|
|
|
#include "livestatus/negatefilter.hpp"
|
2013-03-10 15:11:32 +01:00
|
|
|
|
|
|
|
using namespace icinga;
|
|
|
|
|
2018-01-04 08:54:18 +01:00
|
|
|
NegateFilter::NegateFilter(Filter::Ptr inner)
|
|
|
|
: m_Inner(std::move(inner))
|
2013-03-10 15:11:32 +01:00
|
|
|
{ }
|
|
|
|
|
2013-07-10 16:11:40 +02:00
|
|
|
bool NegateFilter::Apply(const Table::Ptr& table, const Value& row)
|
2013-03-10 15:11:32 +01:00
|
|
|
{
|
2013-07-10 16:11:40 +02:00
|
|
|
return !m_Inner->Apply(table, row);
|
2013-03-10 15:11:32 +01:00
|
|
|
}
|