2026-01-27 09:06:40 -05:00
|
|
|
// SPDX-FileCopyrightText: 2012 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2013-03-22 09:40:55 -04:00
|
|
|
|
|
|
|
|
#ifndef MACRORESOLVER_H
|
|
|
|
|
#define MACRORESOLVER_H
|
|
|
|
|
|
2014-05-25 10:23:35 -04:00
|
|
|
#include "icinga/i2-icinga.hpp"
|
|
|
|
|
#include "icinga/checkresult.hpp"
|
|
|
|
|
#include "base/dictionary.hpp"
|
2014-10-19 08:48:19 -04:00
|
|
|
#include "base/string.hpp"
|
2013-03-22 09:40:55 -04:00
|
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Resolves macros.
|
|
|
|
|
*
|
|
|
|
|
* @ingroup icinga
|
|
|
|
|
*/
|
2017-12-31 01:22:16 -05:00
|
|
|
class MacroResolver
|
2013-03-22 09:40:55 -04:00
|
|
|
{
|
|
|
|
|
public:
|
2014-11-07 06:32:25 -05:00
|
|
|
DECLARE_PTR_TYPEDEFS(MacroResolver);
|
2013-03-22 09:40:55 -04:00
|
|
|
|
2020-07-03 09:53:51 -04:00
|
|
|
static thread_local Dictionary::Ptr OverrideMacros;
|
2020-07-03 09:13:51 -04:00
|
|
|
|
2014-11-26 14:43:42 -05:00
|
|
|
virtual bool ResolveMacro(const String& macro, const CheckResult::Ptr& cr, Value *result) const = 0;
|
2013-03-22 09:40:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* MACRORESOLVER_H */
|