#include <abstractprocessorport.h>
Collaboration diagram for rGeddei::AbstractProcessorPort:
Public Member Functions | |
const bool | connect (const AbstractProcessorPort &input) |
const bool | disconnect () |
const bool | operator-- (int) |
const bool | operator>>= (const AbstractProcessorPort &input) |
AbstractProcessorPort & | setSize (const uint bufferSize) |
const bool | share () |
const bool | split () |
Friends | |
class | AbstractProcessor |
class | AbstractProcessorIn |
This is a convenience class meant primarily as an adjunct to the AbstractProcessor class to allow subscripting (['s and ]'s) to be used to manage connections.
See the operators and methods for more information about general use.
const bool rGeddei::AbstractProcessorPort::connect | ( | const AbstractProcessorPort & | input | ) |
Assert that this port represents an output port, and create a connection between it and input (asserted as an input port).
Example, given P and Q are AbstractProcessor subclass objects, P with two output ports and Q with two input ports:
P[0].connect(Q[0]); P[1].connect(Q[1]);
input | AbstractProcessorPort object which, it is asserted describes an input port. |
const bool rGeddei::AbstractProcessorPort::disconnect | ( | ) |
Assert that this port represents an output port and delete the connection it is sourcing.
Example, given P and Q are AbstractProcessor objects:
P[0].connect(Q[0]);
// Do some processing...
P[0].disconnect();
const bool rGeddei::AbstractProcessorPort::operator-- | ( | int | ) | [inline] |
Shorthand operator for disconnecting. Does the same as the disconnect() method.
Example, given P and Q are AbstractProcessor objects:
P[0].connect(Q[0]);
// Do some processing...
P[0]--;
const bool rGeddei::AbstractProcessorPort::operator>>= | ( | const AbstractProcessorPort & | input | ) | [inline] |
Shorthand operator for connecting. Does the same as the connect() method.
Example, given P and Q are AbstractProcessor objects:
P[0] >>= Q[0];
// Do some processing...
P[0].disconnect();
input | AbstractProcessorPort object which, it is asserted describes an input port. |
AbstractProcessorPort& rGeddei::AbstractProcessorPort::setSize | ( | const uint | bufferSize | ) | [inline] |
Set a minimum size for the buffer (in elements).
This method rarely needs to be used. It is generally considered the job of the Processor subclass to determine how much buffer space if needed, however this method may be used in some extreme cases to tweak buffer usage in the case that a particular amount of high-speed memory is available.
Ignore this otherwise.
bufferSize | The minimum number of elements to be used for this connection's buffer. |
Processor::specifyOutputSpace()
const bool rGeddei::AbstractProcessorPort::share | ( | ) |
Share the output of a Processor.
See AbstractProcessor::share() for more details.
Example, given P, Q are RemoteProcessor objects, in the same session:
// Share the first output port of P P[0].share(); // Connect the first output port of P to the first input port of Q P[0].connect(Q[0]); // Connect the same output to the second port of Q P[0].connect(Q[1]);
const bool rGeddei::AbstractProcessorPort::split | ( | ) |
Split the output of a Processor.
See AbstractProcessor::split() for more details.
Example, given P, Q are RemoteProcessor objects:
// Share the first output port of P P[0].split(); // Connect the first output port of P to the first input port of Q P[0].connect(Q[0]); // Connect the same output to the second port of Q P[0].connect(Q[1]);