mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-10 11:28:13 +02:00
20 lines
349 B
C++
20 lines
349 B
C++
/* Icinga 2 | (c) 2020 Icinga GmbH | GPLv2+ */
|
|
|
|
#include "base/generator-array.hpp"
|
|
#include "base/objectlock.hpp"
|
|
#include "base/value.hpp"
|
|
|
|
using namespace icinga;
|
|
|
|
bool GeneratorArray::GetNext(Value& out)
|
|
{
|
|
ObjectLock oLock (m_Source);
|
|
|
|
if (m_Next < m_Source->GetLength()) {
|
|
out = m_Source->Get(m_Next++);
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|