svcore  1.9
RealTimeEffectModelTransformer Class Reference

#include <RealTimeEffectModelTransformer.h>

Inheritance diagram for RealTimeEffectModelTransformer:
Collaboration diagram for RealTimeEffectModelTransformer:

Public Types

typedef std::vector< Model * > Models
 
enum  Type { RTThread, NonRTThread }
 

Public Slots

void start ()
 

Public Member Functions

 RealTimeEffectModelTransformer (Input input, const Transform &transform)
 
virtual ~RealTimeEffectModelTransformer ()
 
void abandon ()
 Hint to the processing thread that it should give up, for example because the process is going to exit or we want to get rid of the input model. More...
 
ModelgetInputModel ()
 Return the input model for the transform. More...
 
int getInputChannel ()
 Return the input channel spec for the transform. More...
 
Models getOutputModels ()
 Return the set of output models created by the transform or transforms. More...
 
Models detachOutputModels ()
 Return the set of output models, also detaching them from the transformer so that they will not be deleted when the transformer is. More...
 
virtual Models getAdditionalOutputModels ()
 Return any additional models that were created during processing. More...
 
virtual bool willHaveAdditionalOutputModels ()
 Return true if the current transform is one that may produce additional models (to be retrieved through getAdditionalOutputModels above). More...
 
virtual Models detachAdditionalOutputModels ()
 Return the set of additional models, also detaching them from the transformer. More...
 
QString getMessage () const
 Return a warning or error message. More...
 

Protected Member Functions

virtual void run ()
 
DenseTimeValueModelgetConformingInput ()
 

Protected Attributes

QString m_units
 
RealTimePluginInstancem_plugin
 
int m_outputNo
 
Transforms m_transforms
 
Input m_input
 
Models m_outputs
 
bool m_detached
 
bool m_detachedAdd
 
bool m_abandoned
 
QString m_message
 

Detailed Description

Definition at line 24 of file RealTimeEffectModelTransformer.h.

Member Typedef Documentation

◆ Models

typedef std::vector<Model *> ModelTransformer::Models
inherited

Definition at line 43 of file ModelTransformer.h.

Member Enumeration Documentation

◆ Type

enum Thread::Type
inherited
Enumerator
RTThread 
NonRTThread 

Definition at line 29 of file Thread.h.

Constructor & Destructor Documentation

◆ RealTimeEffectModelTransformer()

◆ ~RealTimeEffectModelTransformer()

RealTimeEffectModelTransformer::~RealTimeEffectModelTransformer ( )
virtual

Definition at line 106 of file RealTimeEffectModelTransformer.cpp.

References m_plugin.

Member Function Documentation

◆ run()

◆ getConformingInput()

DenseTimeValueModel * RealTimeEffectModelTransformer::getConformingInput ( )
protected

◆ abandon()

void ModelTransformer::abandon ( )
inlineinherited

Hint to the processing thread that it should give up, for example because the process is going to exit or we want to get rid of the input model.

Caller should still wait() and/or delete the transform before assuming its input and output models are no longer required.

Definition at line 68 of file ModelTransformer.h.

References ModelTransformer::m_abandoned.

Referenced by ModelTransformerFactory::modelAboutToBeDeleted(), and FeatureExtractionModelTransformer::setCompletion().

◆ getInputModel()

Model* ModelTransformer::getInputModel ( )
inlineinherited

◆ getInputChannel()

int ModelTransformer::getInputChannel ( )
inlineinherited

Return the input channel spec for the transform.

Definition at line 78 of file ModelTransformer.h.

References ModelTransformer::Input::getChannel(), and ModelTransformer::m_input.

◆ getOutputModels()

Models ModelTransformer::getOutputModels ( )
inlineinherited

Return the set of output models created by the transform or transforms.

Returns an empty list if any transform could not be initialised; an error message may be available via getMessage() in this situation.

Definition at line 86 of file ModelTransformer.h.

References ModelTransformer::m_outputs.

Referenced by ModelTransformer::detachOutputModels(), ModelTransformerFactory::modelAboutToBeDeleted(), and ModelTransformer::~ModelTransformer().

◆ detachOutputModels()

Models ModelTransformer::detachOutputModels ( )
inlineinherited

Return the set of output models, also detaching them from the transformer so that they will not be deleted when the transformer is.

The caller takes ownership of the models.

Definition at line 93 of file ModelTransformer.h.

References ModelTransformer::getOutputModels(), and ModelTransformer::m_detached.

Referenced by ModelTransformerFactory::transformMultiple().

◆ getAdditionalOutputModels()

virtual Models ModelTransformer::getAdditionalOutputModels ( )
inlinevirtualinherited

Return any additional models that were created during processing.

This might happen if, for example, a transform was configured to split a multi-bin output into separate single-bin models as it processed. These should not be queried until after the transform has completed.

Reimplemented in FeatureExtractionModelTransformer.

Definition at line 105 of file ModelTransformer.h.

Referenced by ModelTransformer::detachAdditionalOutputModels(), and ModelTransformer::~ModelTransformer().

◆ willHaveAdditionalOutputModels()

virtual bool ModelTransformer::willHaveAdditionalOutputModels ( )
inlinevirtualinherited

Return true if the current transform is one that may produce additional models (to be retrieved through getAdditionalOutputModels above).

Reimplemented in FeatureExtractionModelTransformer.

Definition at line 112 of file ModelTransformer.h.

Referenced by ModelTransformerFactory::transformerFinished().

◆ detachAdditionalOutputModels()

virtual Models ModelTransformer::detachAdditionalOutputModels ( )
inlinevirtualinherited

Return the set of additional models, also detaching them from the transformer.

The caller takes ownership of the models.

Definition at line 118 of file ModelTransformer.h.

References ModelTransformer::getAdditionalOutputModels(), and ModelTransformer::m_detachedAdd.

Referenced by ModelTransformerFactory::transformerFinished().

◆ getMessage()

QString ModelTransformer::getMessage ( ) const
inlineinherited

Return a warning or error message.

If getOutputModel returned a null pointer, this should contain a fatal error message for the transformer; otherwise it may contain a warning to show to the user about e.g. suboptimal block size or whatever.

Definition at line 129 of file ModelTransformer.h.

References ModelTransformer::m_message.

Referenced by ModelTransformerFactory::transformMultiple().

◆ start

Member Data Documentation

◆ m_units

QString RealTimeEffectModelTransformer::m_units
protected

Definition at line 34 of file RealTimeEffectModelTransformer.h.

Referenced by RealTimeEffectModelTransformer().

◆ m_plugin

RealTimePluginInstance* RealTimeEffectModelTransformer::m_plugin
protected

◆ m_outputNo

int RealTimeEffectModelTransformer::m_outputNo
protected

Definition at line 36 of file RealTimeEffectModelTransformer.h.

Referenced by RealTimeEffectModelTransformer(), and run().

◆ m_transforms

◆ m_input

◆ m_outputs

◆ m_detached

bool ModelTransformer::m_detached
protectedinherited

◆ m_detachedAdd

bool ModelTransformer::m_detachedAdd
protectedinherited

◆ m_abandoned

bool ModelTransformer::m_abandoned
protectedinherited

◆ m_message

QString ModelTransformer::m_message
protectedinherited

The documentation for this class was generated from the following files: