![]() |
ezEngine
Release 25.03
|
A stream group encapsulates the streams and the corresponding data processors. More...
#include <ProcessingStreamGroup.h>
Public Member Functions | |
ezProcessingStreamGroup () | |
Constructor. | |
~ezProcessingStreamGroup () | |
Destructor. | |
void | Clear () |
void | AddProcessor (ezProcessingStreamProcessor *pProcessor) |
Adds a stream processor to the stream group. Ownership is transferred to the stream group and the processor will be deallocated using the RTTI deallocator on destruction. Processors are executed in the order they are added to the stream group. | |
void | RemoveProcessor (ezProcessingStreamProcessor *pProcessor) |
Removes the given stream processor from the group. | |
void | ClearProcessors () |
Removes all stream processors from the group. | |
ezProcessingStream * | AddStream (ezStringView sName, ezProcessingStream::DataType type) |
Adds a stream with the given name to the stream group. Adding a stream two times with the same name will return nullptr for the second attempt to signal an error. | |
void | RemoveStreamByName (ezStringView sName) |
Removes the stream with the given name, if it exists. | |
ezProcessingStream * | GetStreamByName (ezStringView sName) const |
Returns the stream by it's name, returns nullptr if not existent. More efficient since direct use of ezHashedString. | |
void | SetSize (ezUInt64 uiNumElements) |
Resizes all streams to contain storage for uiNumElements. Any pending remove and spawn operations will be reset! | |
void | RemoveElement (ezUInt64 uiElementIndex) |
Removes an element (e.g. due to the death of a particle etc.), this will be enqueued (and thus is safe to be called from within data processors). | |
void | InitializeElements (ezUInt64 uiNumElements) |
Spawns a number of new elements, they will be added as newly initialized stream elements. Safe to call from data processors since the spawning will be queued. | |
void | Process () |
Runs the stream processors which have been added to the stream group. | |
ezUInt64 | GetNumElements () const |
Returns the number of elements the streams store. | |
ezUInt64 | GetNumActiveElements () const |
Returns the number of currently active elements. | |
ezUInt64 | GetHighestNumActiveElements () const |
Returns the highest number of active elements since the last SetSize() call. | |
Public Attributes | |
ezEvent< const ezStreamGroupElementRemovedEvent & > | m_ElementRemovedEvent |
Subscribe to this event to be informed when (shortly before) items are deleted. | |
A stream group encapsulates the streams and the corresponding data processors.