stromx  0.8.0
Public Member Functions | Protected Member Functions | List of all members
stromx::runtime::OperatorKernel Class Referenceabstract

Abstract operator kernel. More...

#include <OperatorKernel.h>

Inheritance diagram for stromx::runtime::OperatorKernel:
stromx::runtime::OperatorInfo stromx::cvsupport::AdjustRgbChannels stromx::cvsupport::Buffer stromx::cvsupport::Clip stromx::cvsupport::ConstImage stromx::cvsupport::ConvertPixelType stromx::cvsupport::DummyCamera stromx::cvsupport::Flicker stromx::cvsupport::ReadDirectory stromx::runtime::Block stromx::runtime::Compare stromx::runtime::Counter stromx::runtime::DataOperatorBase stromx::runtime::Dump stromx::runtime::Filter stromx::runtime::Fork stromx::runtime::Join stromx::runtime::MatrixPropertyBase stromx::runtime::Merge stromx::runtime::PeriodicDelay stromx::runtime::Queue stromx::runtime::Receive stromx::runtime::Repeat stromx::runtime::Send stromx::runtime::Split

Public Member Functions

virtual OperatorKernelclone () const =0
 
const std::string & type () const
 
const std::string & package () const
 
const Versionversion () const
 
const std::vector< const Input * > & inputs () const
 
const std::vector< const Output * > & outputs () const
 
const std::vector< const Parameter * > & parameters () const
 
const Parameterparameter (const unsigned int id) const
 
const Inputinput (const unsigned int id) const
 
const Outputoutput (const unsigned int id) const
 
const Descriptiondescription (const unsigned int id) const
 
const OperatorPropertiesproperties () 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 *> &parameters, 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 *> &parameters, 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 *> &parameters)
 
Parameterparameter (const unsigned int id)
 

Detailed Description

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.

Constructor & Destructor Documentation

§ OperatorKernel() [1/4]

stromx::runtime::OperatorKernel::OperatorKernel ( const std::string &  type,
const std::string &  package,
const Version version,
const std::vector< const Parameter *> &  parameters,
const OperatorProperties properties = OperatorProperties() 
)
protected

Constructs an operator kernel.

Parameters
parametersA 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.
propertiesOptionally, the properties of this operator.

§ OperatorKernel() [2/4]

stromx::runtime::OperatorKernel::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 *> &  parameters,
const OperatorProperties properties = OperatorProperties() 
)
protected

Constructs an operator kernel.

Parameters
inputsA list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted.
outputsA list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted.
parametersA 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.
propertiesOptionally, the properties of this operator.

§ OperatorKernel() [3/4]

stromx::runtime::OperatorKernel::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() 
)
protected

Constructs an operator kernel.

Parameters
inputsA list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted.
outputsA list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted.
propertiesOptionally, the properties of this operator.

§ OperatorKernel() [4/4]

stromx::runtime::OperatorKernel::OperatorKernel ( const std::string &  type,
const std::string &  package,
const Version version,
const OperatorProperties properties = OperatorProperties() 
)
protected

Constructs an operator kernel.

Parameters
propertiesOptionally, the properties of this operator.

Member Function Documentation

§ activate()

virtual void stromx::runtime::OperatorKernel::activate ( )
inlinevirtual

§ clone()

virtual OperatorKernel* stromx::runtime::OperatorKernel::clone ( ) const
pure virtual

§ deactivate()

virtual void stromx::runtime::OperatorKernel::deactivate ( )
inlinevirtual

§ deinitialize()

void stromx::runtime::OperatorKernel::deinitialize ( )
virtual

Deinitializes the operator. Must be called from any overloads of this function in derived classes.

Reimplemented in stromx::cvsupport::DummyCamera.

§ description()

const Description & stromx::runtime::OperatorKernel::description ( const unsigned int  id) const
virtual

Returns the description (i.e. input, output or parameter) id.

Exceptions
WrongIdIf no parameter with id exists.

Implements stromx::runtime::OperatorInfo.

§ execute()

virtual void stromx::runtime::OperatorKernel::execute ( DataProvider provider)
pure virtual

§ getParameter()

virtual const DataRef stromx::runtime::OperatorKernel::getParameter ( const unsigned int  ) const
inlinevirtual

§ initialize() [1/2]

void stromx::runtime::OperatorKernel::initialize ( )
virtual

§ initialize() [2/2]

virtual void stromx::runtime::OperatorKernel::initialize ( const std::vector< const Input *> &  inputs,
const std::vector< const Output *> &  outputs,
const std::vector< const Parameter *> &  parameters 
)
protectedvirtual

Initializes an operator kernel. Must only be called from OperatorKernel::initialize() and overloads of this function in derived classes.

Parameters
inputsA list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted.
outputsA list of operator input descriptions. The descriptions will be owned by the parent class, i.e. they must not be manually deleted.
parametersA 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.

§ input()

const Input & stromx::runtime::OperatorKernel::input ( const unsigned int  id) const
virtual

Returns the description of the output id.

Exceptions
WrongIdIf no input with id exists.

Implements stromx::runtime::OperatorInfo.

§ inputs()

const std::vector<const Input*>& stromx::runtime::OperatorKernel::inputs ( ) const
inlinevirtual

Returns a list of the inputs of the operator. This list can change when Operator::initialize() is called.

Implements stromx::runtime::OperatorInfo.

§ interrupt()

virtual void stromx::runtime::OperatorKernel::interrupt ( )
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.

§ output()

const Output & stromx::runtime::OperatorKernel::output ( const unsigned int  id) const
virtual

Returns the description of the input id.

Exceptions
WrongIdIf no output with id exists.

Implements stromx::runtime::OperatorInfo.

§ outputs()

const std::vector<const Output*>& stromx::runtime::OperatorKernel::outputs ( ) const
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.

§ package()

const std::string& stromx::runtime::OperatorKernel::package ( ) const
inlinevirtual

Returns the package the operator belongs to.

Implements stromx::runtime::OperatorInfo.

§ parameter() [1/2]

const Parameter & stromx::runtime::OperatorKernel::parameter ( const unsigned int  id) const
virtual

Returns the parameter description of the parameter id.

Exceptions
WrongIdIf no parameter with id exists.

Implements stromx::runtime::OperatorInfo.

§ parameter() [2/2]

Parameter & stromx::runtime::OperatorKernel::parameter ( const unsigned int  id)
protected

Returns the parameter id.

§ parameters()

const std::vector<const Parameter*>& stromx::runtime::OperatorKernel::parameters ( ) const
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.

§ properties()

const OperatorProperties & stromx::runtime::OperatorKernel::properties ( ) const
virtual

Returns the properties of this operator.

Implements stromx::runtime::OperatorInfo.

§ setParameter()

virtual void stromx::runtime::OperatorKernel::setParameter ( const unsigned int  ,
const Data  
)
inlinevirtual

§ type()

const std::string& stromx::runtime::OperatorKernel::type ( ) const
inlinevirtual

Returns the type. In general this is the name of the class of its implementation.

Implements stromx::runtime::OperatorInfo.

§ version()

const Version& stromx::runtime::OperatorKernel::version ( ) const
inlinevirtual

Returns the version of the operator.

Implements stromx::runtime::OperatorInfo.


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