stromx  0.8.0
Public Types | Public Member Functions | List of all members
stromx::runtime::Thread Class Reference

A thread which visits input nodes. More...

#include <Thread.h>

Public Types

enum  Status { INACTIVE, ACTIVE, DEACTIVATING, PAUSED }
 

Public Member Functions

Status status () const
 
const std::string & name () const
 
void setName (const std::string &name)
 
const Colorcolor () const
 
void setColor (const Color &color)
 
const std::vector< InputConnector > & inputSequence () const
 
void addInput (Operator *const op, const unsigned int inputId)
 
void insertInput (const unsigned int position, Operator *const op, const unsigned int inputId)
 
void removeInput (const unsigned int position)
 
void removeInput (Operator *const op, const unsigned int inputId)
 

Detailed Description

A thread which visits input nodes.

A thread visits a given list of operator inputs. For each input in the list it obtains the input data from the connected output and passes it to the input. When data is passed as input to an operator or output data is obtained from the operator the operator is implicitely executed.

Member Enumeration Documentation

§ Status

The possible states of a thread.

Enumerator
INACTIVE 

The thread is inactive.

ACTIVE 

The thread is active.

DEACTIVATING 

The thread was stopped and is waiting to become inactive.

PAUSED 

The thread was paused and be resumed or stopped.

Member Function Documentation

§ addInput()

void stromx::runtime::Thread::addInput ( Operator *const  op,
const unsigned int  inputId 
)

Adds the input inputId of the operator op to the list of currently visited inputs. The operator must be initialized.

Exceptions
WrongStateIf the thread state is not INACTIVE.
WrongStateIf the operator is not initialized.
WrongArgumentIf op is null.

§ color()

const Color & stromx::runtime::Thread::color ( ) const

Returns the color of the thread.

§ inputSequence()

const std::vector< InputConnector > & stromx::runtime::Thread::inputSequence ( ) const

Returns a list of the operator inputs which are assigned to this thread.

§ insertInput()

void stromx::runtime::Thread::insertInput ( const unsigned int  position,
Operator *const  op,
const unsigned int  inputId 
)

Inserts the input inputId of the operator op into the list of currently visited inputs at position. The operator must be initialized.

Exceptions
WrongStateIf the thread state is not INACTIVE.
WrongStateIf the operator is not initialized.
WrongArgumentIf op is null or if there is no input at position.

§ name()

const std::string & stromx::runtime::Thread::name ( ) const

Returns the name of the thread.

§ removeInput() [1/2]

void stromx::runtime::Thread::removeInput ( const unsigned int  position)

Removes the input at position from the list of currently visited inputs.

Exceptions
WrongStateIf the thread state is not INACTIVE.
WrongArgumentIf there is no input at position.

§ removeInput() [2/2]

void stromx::runtime::Thread::removeInput ( Operator *const  op,
const unsigned int  inputId 
)

Removes the input inputId of the operator op from the list of currently visited inputs.

Exceptions
WrongStateIf the thread state is not INACTIVE.
WrongArgumentIf op is null.

§ setColor()

void stromx::runtime::Thread::setColor ( const Color color)

Sets the color of the thread. The color is used only for visualizing the stream and does not have any effect on the functionality of the thread.

§ setName()

void stromx::runtime::Thread::setName ( const std::string &  name)

Sets the name of the thread.

§ status()

Thread::Status stromx::runtime::Thread::status ( ) const

Returns the current state of the thread.


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