icinga2/lib/base/generator-map.cpp
Alexander A. Klimov cbd94e060d DSL: add generators
2025-04-29 11:01:17 +02:00

20 lines
322 B
C++

/* Icinga 2 | (c) 2020 Icinga GmbH | GPLv2+ */
#include "base/generator-map.hpp"
#include "base/value.hpp"
#include <utility>
using namespace icinga;
bool GeneratorMap::GetNext(Value& out)
{
Value buf;
if (m_Source->GetNext(buf)) {
out = m_Function->Invoke({ std::move(buf) });
return true;
}
return false;
}