![]() |
ImFusion C++ SDK 4.4.0
|
#include <ImFusion/Stream/StreamGroupBase.h>
Non-templated base class for stream groups. More...
Non-templated base class for stream groups.
StreamGroupBase provides a structure for bundling multiple related streams into a single logical unit. It manages a proxy stream (the representative and controller) and an arbitrary number of substreams, coordinating their lifecycle and data emission.
The stream group appears as CompoundData in the data model, with the proxy stream acting as the representative Concrete implementations should use the StreamGroup template class rather than directly inheriting from StreamGroupBase.
Public Member Functions | |
| virtual Stream * | proxyStream ()=0 |
| Returns the proxy stream representative that controls this stream group. | |
| virtual std::vector< Stream * > | substreams () const =0 |
| Returns all substreams in this stream group. | |
| Public Member Functions inherited from ImFusion::CompoundData | |
| virtual DataList | children () const =0 |
| Returns the list of direct children of this group. | |
| Public Member Functions inherited from ImFusion::SignalReceiver | |
| SignalReceiver ()=default | |
| Default constructor. | |
| SignalReceiver (const SignalReceiver &other) | |
| Copy constructor, does not copy any existing signal connections from other. | |
| SignalReceiver & | operator= (SignalReceiver rhs) |
| Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs. | |
| virtual | ~SignalReceiver () |
| Virtual destructor disconnects from all connected signals. | |
Public Attributes | |
| ProtectedSignal< std::shared_ptr< const CompoundStreamData > > | signalNewStreamGroupData |
| Signal emitted when new stream data is available from the stream group. | |
| Public Attributes inherited from ImFusion::CompoundData | |
| Signal< Data * > | signalChildAdded |
| Signal emitted when a new Data instance has been added to children(). | |
| Signal< Data * > | signalChildMoved |
| Signal emitted when a Data instance has changed its position in children(). | |
| Signal< Data * > | signalChildAboutToBeRemoved |
| Signal emitted when a Data instance is about to be removed or taken from children(). | |
Protected Member Functions | |
| virtual bool | addSubstream (std::unique_ptr< SubstreamBase > substream)=0 |
| Adds a substream to the stream group. | |
| virtual bool | removeSubstream (Stream *substream)=0 |
| Removes a substream from the stream group. | |
| void | reassignSubstream (SubstreamBase *substream) |
| Reassigns a substream to this stream group. | |
| Protected Member Functions inherited from ImFusion::Utils::NotCopyable | |
| NotCopyable (NotCopyable &&) noexcept=default | |
| NotCopyable & | operator= (NotCopyable &&) noexcept=default |
| NotCopyable (const NotCopyable &)=delete | |
| NotCopyable & | operator= (const NotCopyable &)=delete |
| Protected Member Functions inherited from ImFusion::SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
|
pure virtual |
Returns the proxy stream representative that controls this stream group.
Typically, a cast of the stream group to the proxy stream class.
Implemented in ImFusion::StreamGroup< Proxy >, ImFusion::StreamGroup< AtracsysTrackingStreamBase >, and ImFusion::StreamGroup< StereoImageStream >.
|
pure virtualthreadsafe |
Returns all substreams in this stream group.
Can be called concurrently from any thread.
Implemented in ImFusion::StreamGroup< Proxy >, ImFusion::StreamGroup< AtracsysTrackingStreamBase >, and ImFusion::StreamGroup< StereoImageStream >.
|
protectedpure virtualthreadsafe |
Adds a substream to the stream group.
Ownership is transferred to the stream group. Returns true if the substream was added successfully, false otherwise.
Can be called concurrently from any thread.
Implemented in ImFusion::StreamGroup< Proxy >, ImFusion::StreamGroup< AtracsysTrackingStreamBase >, and ImFusion::StreamGroup< StereoImageStream >.
|
protectedpure virtualthreadsafe |
Removes a substream from the stream group.
The removal is thread-safe and may be invoked on the main thread if called from a worker thread.
Returns true if the substream was removed successfully, false if not found.
Can be called concurrently from any thread.
Implemented in ImFusion::StreamGroup< Proxy >, ImFusion::StreamGroup< AtracsysTrackingStreamBase >, and ImFusion::StreamGroup< StereoImageStream >.
|
inlineprotected |
Reassigns a substream to this stream group.
Used internally by the move operator to update substream ownership.
| ProtectedSignal<std::shared_ptr<const CompoundStreamData> > ImFusion::StreamGroupBase::signalNewStreamGroupData |
Signal emitted when new stream data is available from the stream group.
Emits CompoundStreamData containing the StreamData from the proxy stream and all substreams. This signal is emitted alongside individual Stream::signalStreamData emissions for each stream.
Connect to this signal when you need to process data from multiple streams simultaneously (e.g., synchronized image and tracking data).