roviz  0.7
Code Documentation of roviz
Public Member Functions | Friends | List of all members
Input< T > Class Template Reference

Represents the input of an item. More...

#include <input.h>

Collaboration diagram for Input< T >:
Collaboration graph

Public Member Functions

 Input (RovizItem *item)
 
next (void)
 Returns the next object in the input queue. More...
 
newest (void)
 Returns the newest object in the input queue. More...
 
bool waitForInput (void)
 Wait until an object is available at the input. More...
 

Friends

class RovizItemBase
 

Detailed Description

template<class T>
class Input< T >

Represents the input of an item.

The input will receive StreamObject's that other items, that are connected to this input, emit. The template type of this class has to be a valid StreamObject implementation.

See also
Output

Member Function Documentation

◆ newest()

template<class T >
T Input< T >::newest ( void  )

Returns the newest object in the input queue.

Parameters
inputThe input handle returned from addInput()
Returns
Returns the newest object in the input queue

All older objects in the input queue are discarded.

See also
addInput
next

◆ next()

template<class T >
T Input< T >::next ( void  )

Returns the next object in the input queue.

Parameters
inputThe input handle returned from addInput()
Returns
The next object in the input queue
See also
addInput
newest

◆ waitForInput()

template<class T >
bool Input< T >::waitForInput ( void  )

Wait until an object is available at the input.

Parameters
inputThe input handle returned from addInput()
Returns
true - New object is available false - The item was stopped, the thread HAS TO exit

This function should be used by most (image processing) items to ensure the start/pause/stop mechanism works.

This function implements the pause/stop mechanism. It doesn't return as long as the item is paused and returns false if it is stopped. It is important that the thread exits when this happens!

See also
waitFor
wait
running

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