2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2014-04-23 12:44:36 +02:00
|
|
|
|
2014-05-25 16:23:35 +02:00
|
|
|
#include "config/objectrule.hpp"
|
2014-05-11 17:14:35 +02:00
|
|
|
#include <set>
|
2014-04-23 12:44:36 +02:00
|
|
|
|
|
|
|
using namespace icinga;
|
|
|
|
|
2014-11-16 16:20:39 +01:00
|
|
|
ObjectRule::TypeSet ObjectRule::m_Types;
|
2014-04-23 12:44:36 +02:00
|
|
|
|
2014-11-16 16:20:39 +01:00
|
|
|
void ObjectRule::RegisterType(const String& sourceType)
|
2014-04-23 12:44:36 +02:00
|
|
|
{
|
2014-11-16 16:20:39 +01:00
|
|
|
m_Types.insert(sourceType);
|
2014-04-23 12:44:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool ObjectRule::IsValidSourceType(const String& sourceType)
|
|
|
|
{
|
2014-11-16 16:20:39 +01:00
|
|
|
return m_Types.find(sourceType) != m_Types.end();
|
2014-04-23 12:44:36 +02:00
|
|
|
}
|