mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-08 02:18:12 +02:00
21 lines
342 B
C++
21 lines
342 B
C++
/* Icinga 2 | (c) 2020 Icinga GmbH | GPLv2+ */
|
|
|
|
#include "base/generator-range.hpp"
|
|
#include "base/objectlock.hpp"
|
|
#include "base/value.hpp"
|
|
|
|
using namespace icinga;
|
|
|
|
bool GeneratorRange::GetNext(Value& out)
|
|
{
|
|
ObjectLock oLock (this);
|
|
|
|
if (m_Current < m_Stop) {
|
|
out = m_Current;
|
|
m_Current += m_Step;
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|