2026-01-27 09:06:40 -05:00
|
|
|
// SPDX-FileCopyrightText: 2012 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2014-04-23 06:44:36 -04:00
|
|
|
|
2014-05-25 10:23:35 -04:00
|
|
|
#include "config/objectrule.hpp"
|
2014-05-11 11:14:35 -04:00
|
|
|
#include <set>
|
2014-04-23 06:44:36 -04:00
|
|
|
|
|
|
|
|
using namespace icinga;
|
|
|
|
|
|
2014-11-16 10:20:39 -05:00
|
|
|
ObjectRule::TypeSet ObjectRule::m_Types;
|
2014-04-23 06:44:36 -04:00
|
|
|
|
2014-11-16 10:20:39 -05:00
|
|
|
void ObjectRule::RegisterType(const String& sourceType)
|
2014-04-23 06:44:36 -04:00
|
|
|
{
|
2014-11-16 10:20:39 -05:00
|
|
|
m_Types.insert(sourceType);
|
2014-04-23 06:44:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool ObjectRule::IsValidSourceType(const String& sourceType)
|
|
|
|
|
{
|
2014-11-16 10:20:39 -05:00
|
|
|
return m_Types.find(sourceType) != m_Types.end();
|
2014-04-23 06:44:36 -04:00
|
|
|
}
|