rGeddei::AbstractProcessorPort Class Reference
[rGeddei's core classes.]

Model of an AbstractProcessor connection port. More...

#include <abstractprocessorport.h>

Collaboration diagram for rGeddei::AbstractProcessorPort:

Collaboration graph
[legend]
List of all members.

Public Member Functions

const bool connect (const AbstractProcessorPort &input)
const bool disconnect ()
const bool operator-- (int)
const bool operator>>= (const AbstractProcessorPort &input)
AbstractProcessorPortsetSize (const uint bufferSize)
const bool share ()
const bool split ()

Friends

class AbstractProcessor
class AbstractProcessorIn

Detailed Description

Model of an AbstractProcessor connection port.

Author:
Gav Wood <gav@cs.york.ac.uk>
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.

Note:
There is no difference between input and output ports in AbstractProcessorPort. An Abstract ProcessorPort object determines use depending on context.


Member Function Documentation

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]);

Parameters:
input AbstractProcessorPort object which, it is asserted describes an input port.
See also:
disconnect()

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();

See also:
connect()

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]--;

See also:
disconnect()

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();

Parameters:
input AbstractProcessorPort object which, it is asserted describes an input port.
See also:
connect()

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.

Parameters:
bufferSize The minimum number of elements to be used for this connection's buffer.
Returns:
A reference to this object.
See also:
Processor::specifyInputSpace()

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]);


The documentation for this class was generated from the following files:
Generated on Fri Nov 10 21:58:40 2006 for Exscalibar by  doxygen 1.5.1