![]() |
stromx
0.8.0
|
Abstract operator kernel. More...
#include <OperatorKernel.h>
Public Member Functions | |
| virtual OperatorKernel * | clone () const =0 |
| const std::string & | type () const |
| const std::string & | package () const |
| const Version & | version () const |
| const std::vector< const Input * > & | inputs () const |
| const std::vector< const Output * > & | outputs () const |
| const std::vector< const Parameter * > & | parameters () const |
| const Parameter & | parameter (const unsigned int id) const |
| const Input & | input (const unsigned int id) const |
| const Output & | output (const unsigned int id) const |
| const Description & | description (const unsigned int id) const |
| const OperatorProperties & | properties () const |
| virtual void | setParameter (const unsigned int, const Data &) |
| virtual const DataRef | getParameter (const unsigned int) const |
| virtual void | execute (DataProvider &provider)=0 |
| virtual void | initialize () |
| virtual void | deinitialize () |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual void | interrupt () |
Protected Member Functions | |
| OperatorKernel (const std::string &type, const std::string &package, const Version &version, const std::vector< const Parameter *> ¶meters, const OperatorProperties &properties=OperatorProperties()) | |
| OperatorKernel (const std::string &type, const std::string &package, const Version &version, const std::vector< const Input *> &inputs, const std::vector< const Output *> &outputs, const std::vector< const Parameter *> ¶meters, const OperatorProperties &properties=OperatorProperties()) | |
| OperatorKernel (const std::string &type, const std::string &package, const runtime::Version &version, const std::vector< const Input * > &inputs, const std::vector< const Output * > &outputs, const OperatorProperties &properties=OperatorProperties()) | |
| OperatorKernel (const std::string &type, const std::string &package, const Version &version, const OperatorProperties &properties=OperatorProperties()) | |
| virtual void | initialize (const std::vector< const Input *> &inputs, const std::vector< const Output *> &outputs, const std::vector< const Parameter *> ¶meters) |
| Parameter & | parameter (const unsigned int id) |
Abstract operator kernel.
An operator kernel implements an operator in its raw form, i.e. without the infrastructure code which is necessary to be a node in a stream network. It is never directly used in a stream but serves as a base class for the implementation of custom operators.
|
protected |
Constructs an operator kernel.
| parameters | A list of parameter descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. The list must contain descriptions of all operator parameters which can be edited before initialization. It can contain the description of parameters which can be edited only after initialization. |
| properties | Optionally, the properties of this operator. |
|
protected |
Constructs an operator kernel.
| inputs | A list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. |
| outputs | A list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. |
| parameters | A list of parameter descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. The list must contain descriptions of all operator parameters which can be edited before initialization. It can contain the description of parameters which can be edited only after initialization. |
| properties | Optionally, the properties of this operator. |
|
protected |
Constructs an operator kernel.
| inputs | A list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. |
| outputs | A list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. |
| properties | Optionally, the properties of this operator. |
|
protected |
Constructs an operator kernel.
| properties | Optionally, the properties of this operator. |
|
inlinevirtual |
Activates the operator. After activation the operator kernel must be prepared to accept calls to execute().
Reimplemented in stromx::cvsupport::DummyCamera, stromx::runtime::Block, stromx::cvsupport::ReadDirectory, stromx::runtime::PeriodicDelay, stromx::cvsupport::Buffer, stromx::runtime::Receive, stromx::runtime::Repeat, stromx::runtime::Send, stromx::runtime::Merge, stromx::runtime::Split, stromx::runtime::Push, and stromx::runtime::Counter.
|
pure virtual |
Returns a copy of the operator, i.e. a object of the same type is allocated and returned. The current status of the operator is not reproduced.
Implemented in stromx::cvsupport::DummyCamera, stromx::runtime::Block, stromx::runtime::Compare, stromx::cvsupport::ConvertPixelType, stromx::cvsupport::ReadDirectory, stromx::runtime::PeriodicDelay, stromx::cvsupport::AdjustRgbChannels, stromx::cvsupport::ConstImage, stromx::cvsupport::Buffer, stromx::runtime::ConstData, stromx::runtime::Repeat, stromx::cvsupport::Clip, stromx::cvsupport::Flicker, stromx::runtime::Filter, stromx::runtime::Receive, stromx::runtime::Send, stromx::runtime::Merge, stromx::runtime::Queue, stromx::runtime::Split, stromx::runtime::Push, stromx::runtime::Counter, stromx::runtime::Fork, stromx::runtime::Join, stromx::runtime::Dump, stromx::runtime::IsEmpty, and stromx::runtime::IsNotEmpty.
|
inlinevirtual |
Deactivates the operator, i.e. returns its state to the same as before activation.
Reimplemented in stromx::cvsupport::DummyCamera, stromx::cvsupport::Buffer, stromx::runtime::Receive, stromx::runtime::ConstData, stromx::runtime::Repeat, stromx::runtime::Send, stromx::runtime::Merge, stromx::runtime::Split, and stromx::runtime::Queue.
|
virtual |
Deinitializes the operator. Must be called from any overloads of this function in derived classes.
Reimplemented in stromx::cvsupport::DummyCamera.
|
virtual |
Returns the description (i.e. input, output or parameter) id.
| WrongId | If no parameter with id exists. |
Implements stromx::runtime::OperatorInfo.
|
pure virtual |
Executes the operator.
| provider | Provides the input data for the execution and accepts its results. |
Implemented in stromx::cvsupport::DummyCamera, stromx::runtime::Block, stromx::runtime::Compare, stromx::cvsupport::ConvertPixelType, stromx::cvsupport::ReadDirectory, stromx::runtime::Receive, stromx::runtime::PeriodicDelay, stromx::cvsupport::AdjustRgbChannels, stromx::cvsupport::ConstImage, stromx::runtime::ConstData, stromx::cvsupport::Buffer, stromx::runtime::Repeat, stromx::runtime::Send, stromx::cvsupport::Clip, stromx::cvsupport::Flicker, stromx::runtime::Filter, stromx::runtime::Queue, stromx::runtime::Merge, stromx::runtime::Split, stromx::runtime::Fork, stromx::runtime::Join, stromx::runtime::Counter, stromx::runtime::Push, stromx::runtime::MatrixPropertyBase, and stromx::runtime::Dump.
|
inlinevirtual |
Gets the current value of the parameter id.
Reimplemented in stromx::cvsupport::DummyCamera, stromx::runtime::Block, stromx::runtime::Compare, stromx::cvsupport::ConvertPixelType, stromx::cvsupport::ReadDirectory, stromx::runtime::PeriodicDelay, stromx::cvsupport::AdjustRgbChannels, stromx::cvsupport::ConstImage, stromx::cvsupport::Buffer, stromx::runtime::ConstData, stromx::cvsupport::Clip, stromx::cvsupport::Flicker, stromx::runtime::Receive, stromx::runtime::Send, stromx::runtime::DataOperatorBase, stromx::runtime::Merge, stromx::runtime::Queue, stromx::runtime::Split, stromx::runtime::Counter, stromx::runtime::Fork, stromx::runtime::Join, and stromx::runtime::Dump.
|
virtual |
Initializes the operator. After initialization the operator kernel must be prepared to accept calls to activate().
Reimplemented in stromx::cvsupport::DummyCamera, stromx::runtime::Block, stromx::runtime::Compare, stromx::cvsupport::ReadDirectory, stromx::cvsupport::ConvertPixelType, stromx::runtime::Receive, stromx::runtime::Send, stromx::runtime::DataOperatorBase, stromx::runtime::Push, stromx::runtime::Fork, stromx::runtime::Join, and stromx::runtime::MatrixPropertyBase.
|
protectedvirtual |
Initializes an operator kernel. Must only be called from OperatorKernel::initialize() and overloads of this function in derived classes.
| inputs | A list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. |
| outputs | A list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. |
| parameters | A list of parameter descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted. Note that adding parameters which should be edited before initialization at this stage does not make any sense but should be done in the constructor. |
|
virtual |
Returns the description of the output id.
| WrongId | If no input with id exists. |
Implements stromx::runtime::OperatorInfo.
|
inlinevirtual |
Returns a list of the inputs of the operator. This list can change when Operator::initialize() is called.
Implements stromx::runtime::OperatorInfo.
|
inlinevirtual |
Interrupts an executing operator, i.e. the operator stops its execution as soon as possible. The function has no effect if the operator is not currently executing. Note that this function can be called from a thread different than the executing thread at any time.
Reimplemented in stromx::runtime::Receive.
|
virtual |
Returns the description of the input id.
| WrongId | If no output with id exists. |
Implements stromx::runtime::OperatorInfo.
|
inlinevirtual |
Returns a list of the outputs of the operator. This list can change when Operator::initialize() is called. After that it is constant.
Implements stromx::runtime::OperatorInfo.
|
inlinevirtual |
Returns the package the operator belongs to.
Implements stromx::runtime::OperatorInfo.
|
virtual |
Returns the parameter description of the parameter id.
| WrongId | If no parameter with id exists. |
Implements stromx::runtime::OperatorInfo.
|
protected |
Returns the parameter id.
|
inlinevirtual |
Returns a list of the parameters of the operator. This list can only change when Operator::initialize() is called. After that it is constant with exception of the properties (however, not their ID and data variant) of the single parameters.
Implements stromx::runtime::OperatorInfo.
|
virtual |
Returns the properties of this operator.
Implements stromx::runtime::OperatorInfo.
|
inlinevirtual |
Sets a parameter id to value.
Reimplemented in stromx::cvsupport::DummyCamera, stromx::runtime::Block, stromx::runtime::Compare, stromx::cvsupport::ConvertPixelType, stromx::cvsupport::ReadDirectory, stromx::runtime::PeriodicDelay, stromx::cvsupport::AdjustRgbChannels, stromx::cvsupport::ConstImage, stromx::cvsupport::Buffer, stromx::runtime::ConstData, stromx::cvsupport::Clip, stromx::cvsupport::Flicker, stromx::runtime::Receive, stromx::runtime::Send, stromx::runtime::DataOperatorBase, stromx::runtime::Merge, stromx::runtime::Queue, stromx::runtime::Split, stromx::runtime::Push, stromx::runtime::Counter, stromx::runtime::Fork, stromx::runtime::Join, and stromx::runtime::Dump.
|
inlinevirtual |
Returns the type. In general this is the name of the class of its implementation.
Implements stromx::runtime::OperatorInfo.
|
inlinevirtual |
Returns the version of the operator.
Implements stromx::runtime::OperatorInfo.
1.8.12