![]() |
XII Release 0.1.0
|
A stream group encapsulates the streams and the corresponding data processors. More...
#include <ProcessingStreamGroup.h>
Public Member Functions | |
| xiiProcessingStreamGroup () | |
| Constructor. | |
| ~xiiProcessingStreamGroup () | |
| Destructor. | |
| void | Clear () |
| void | AddProcessor (xiiProcessingStreamProcessor *pProcessor) |
| void | RemoveProcessor (xiiProcessingStreamProcessor *pProcessor) |
| Removes the given stream processor from the group. | |
| void | ClearProcessors () |
| Removes all stream processors from the group. | |
| xiiProcessingStream * | AddStream (xiiStringView sName, xiiProcessingStream::DataType type) |
| void | RemoveStreamByName (xiiTempHashedString sName) |
| Removes the stream with the given name, if it exists. | |
| xiiProcessingStream * | GetStreamByName (xiiTempHashedString sName) const |
| Returns the stream by it's name, returns nullptr if not existent. More efficient since direct use of xiiHashedString. | |
| void | SetSize (xiiUInt64 uiNumElements) |
| Resizes all streams to contain storage for uiNumElements. Any pending remove and spawn operations will be reset! | |
| void | RemoveElement (xiiUInt64 uiElementIndex) |
| void | InitializeElements (xiiUInt64 uiNumElements) |
| void | Process () |
| Runs the stream processors which have been added to the stream group. | |
| xiiUInt64 | GetNumElements () const |
| Returns the number of elements the streams store. | |
| xiiUInt64 | GetNumActiveElements () const |
| Returns the number of currently active elements. | |
| xiiUInt64 | GetHighestNumActiveElements () const |
| Returns the highest number of active elements since the last SetSize() call. | |
Public Attributes | |
| xiiEvent< const xiiStreamGroupElementRemovedEvent & > | 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.
| xiiProcessingStreamGroup::xiiProcessingStreamGroup | ( | ) |
Constructor.
Copyright (c) Theophilus Eriata. All Rights Reserved.
| void xiiProcessingStreamGroup::AddProcessor | ( | xiiProcessingStreamProcessor * | 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.
| xiiProcessingStream * xiiProcessingStreamGroup::AddStream | ( | xiiStringView | sName, |
| xiiProcessingStream::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 xiiProcessingStreamGroup::InitializeElements | ( | xiiUInt64 | 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 xiiProcessingStreamGroup::RemoveElement | ( | xiiUInt64 | 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).