/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/Foundation/DataProcessing/Stream/ProcessingStreamIterator.h
35 строк
1 KB
Ingrater
clang-tidy modernize use default member init (#950)
19 май 2023, 13:25
Не верифицирован
19 май 2023, 13:25
c714416
Код
Авторство
О чём код?
#pragma once #include <Foundation/DataProcessing/Stream/ProcessingStream.h> #include <Foundation/Memory/MemoryUtils.h> /// \brief Helper template class to iterate over stream elements. template <typename Type> class ezProcessingStreamIterator { public: /// \brief Constructor. ezProcessingStreamIterator(const ezProcessingStream* pStream, ezUInt64 uiNumElements, ezUInt64 uiStartIndex); /// \brief Returns a reference to the current element. Note that the behavior is undefined if HasReachedEnd() is true! Type& Current() const; /// \brief Returns true of the iterator has reached the end of the stream or the number of elements it should iterate over. bool HasReachedEnd() const; /// \brief Advances the current pointer to the next element in the stream. void Advance(); /// \brief Advances the current pointer by the given number of elements. void Advance(ezUInt32 uiNumElements); // TODO: Add iterator interface? Only makes really sense for element spawners and processors which work on a single stream protected: void* m_pCurrentPtr = nullptr; void* m_pEndPtr = nullptr; ezUInt64 m_uiElementStride = 0; }; #include <Foundation/DataProcessing/Stream/Implementation/ProcessingStreamIterator_inl.h>