2019-02-25 08:48:22 -05:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
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
|
|
|
}
|