classPiiObjectCapturer
#include <PiiObjectCapturer.h>
Emits a received objects as a Qt signal.
Inherits PiiDefaultOperation
Description
Inputs
input0 can also be
accessed as input.
Properties
|
int
|
The number of dynamic inputs (in addition to |
Signals
|
void
|
Emitted for each incoming object if the |
|
void
|
Emitted when everything related to the object in the
|
|
void
|
(
Emitted for each incoming object if the |
Constructors and destructor
Public member functions
|
virtual void
|
(
Checks the operation for execution. |
|
virtual PiiInputSocket *
|
Aliases |
Protected member functions
|
int
|
|
|
virtual void
|
( )
Executes one round of processing. |
|
void
|
(
|
|
virtual void
|
Informs the operation about synchronization events. |
Property details
-
int dynamicInputCount
[read, write]The number of dynamic inputs (in addition to
sync).The default is one.
Function details
-
PiiObjectCapturer
() -
~PiiObjectCapturer
() -
virtual void check
(- bool reset
[virtual]Checks the operation for execution.
This function creates a suitable flow controller by calling createFlowController(). It then sets the flow controller to the active processor and sets the processor as the input controller for all inputs.
If you change socket groupings in your overridden implementation, please call PiiDefaultOperation::check() after that. Otherwise, your new groupings will not be in effect.
Reimplemented from PiiDefaultOperation.
-
Aliases
inputtoinput0.Reimplemented from PiiBasicOperation.
-
int dynamicInputCount
()[protected] -
virtual void process
()[protected, virtual]Executes one round of processing.
This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().
Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns
Running.Exceptions
- PiiExecutionException
-
whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.
Reimplemented from PiiDefaultOperation.
-
void setDynamicInputCount
(- int dynamicInputCount
[protected] -
Informs the operation about synchronization events.
The most typical use of this function is to see when all objects in an input group and all of its child groups have been received. For example, if the operation reads large images from one input and a number of sub-images for each large image from another input, a sync event is sent whenever all the small images that correspond to one large image have been processed. Your implementation may then either just record the synchronized state or to send any buffered data. The default implementation does nothing.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling syncEvent().
void MyOperation::syncEvent(SyncEvent* event) { if (event->type() == SyncEvent::EndInput && event->groupId() == _pLargeImageInput->groupId()) doWhateverNeededNow(); }
Reimplemented from PiiDefaultOperation.
-
Emitted for each incoming object if the
syncinput is not connected and if dynamicInputCount is one. -
Emitted when everything related to the object in the
syncinput has been received. -
void objectsCaptured
(- const QVariantList & objects
[signal]Emitted for each incoming object if the
syncinput is not connected and if dynamicInputCount is greater than one.Each element in the list will be a PiiVariant. The first object is the one read from
input0and so on.
Add a note
Not a single note added yet. Be the first, add yours.