2019-02-25 08:48:22 -05:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2014-05-12 10:45:25 -04:00
|
|
|
|
|
|
|
|
#ifndef CUSTOMVAROBJECT_H
|
|
|
|
|
#define CUSTOMVAROBJECT_H
|
|
|
|
|
|
2014-05-25 10:23:35 -04:00
|
|
|
#include "icinga/i2-icinga.hpp"
|
2018-01-18 07:50:38 -05:00
|
|
|
#include "icinga/customvarobject-ti.hpp"
|
2015-08-15 14:28:05 -04:00
|
|
|
#include "base/configobject.hpp"
|
2014-05-25 10:23:35 -04:00
|
|
|
#include "remote/messageorigin.hpp"
|
2014-05-12 10:45:25 -04:00
|
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
2014-05-19 12:17:47 -04:00
|
|
|
* An object with custom variable attribute.
|
2014-05-12 10:45:25 -04:00
|
|
|
*
|
2014-05-19 12:17:47 -04:00
|
|
|
* @ingroup icinga
|
2014-05-12 10:45:25 -04:00
|
|
|
*/
|
2017-12-31 01:22:16 -05:00
|
|
|
class CustomVarObject : public ObjectImpl<CustomVarObject>
|
2014-05-12 10:45:25 -04:00
|
|
|
{
|
|
|
|
|
public:
|
2014-11-02 18:44:04 -05:00
|
|
|
DECLARE_OBJECT(CustomVarObject);
|
2014-05-12 10:45:25 -04:00
|
|
|
|
2018-01-11 01:08:09 -05:00
|
|
|
void ValidateVars(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils) final;
|
2014-05-12 10:45:25 -04:00
|
|
|
};
|
|
|
|
|
|
2017-12-31 01:22:16 -05:00
|
|
|
int FilterArrayToInt(const Array::Ptr& typeFilters, const std::map<String, int>& filterMap, int defaultValue);
|
2016-06-21 08:46:01 -04:00
|
|
|
|
2014-05-12 10:45:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* CUSTOMVAROBJECT_H */
|