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

AbstractProcessor realisation representing a local Processor object. More...

#include <localprocessor.h>

Inheritance diagram for rGeddei::LocalProcessor:

Inheritance graph
[legend]
Collaboration diagram for rGeddei::LocalProcessor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual const bool connect (const uint sourceIndex, const LocalProcessor *sink, const uint sinkIndex, const uint bufferSize=1)
virtual const bool connect (const uint sourceIndex, const RemoteProcessor *sink, const uint sinkIndex, const uint bufferSize=1)
virtual void disconnect (const uint sourceIndex)
virtual void disconnectAll ()
virtual const bool go ()
virtual const QString name () const
virtual void reset ()
virtual void share (const uint sourceIndex)
virtual void split (const uint sourceIndex)
virtual void stop ()
virtual void waitUntilDone ()
virtual const Processor::ErrorType waitUntilGoing (int *errorData=0)
virtual ~LocalProcessor ()

Protected Attributes

bool theAdopted
ProcessortheProcessor
LocalSessiontheSession

Friends

class AbstractProcessor
class LocalDomProcessor
class LocalSession
class RemoteDomProcessor
class RemoteProcessor

Detailed Description

AbstractProcessor realisation representing a local Processor object.

Author:
Gav Wood <gav@cs.york.ac.uk>
This class is used when a Geddei Processor object needs to be introduced into the rGeddei API system. This is generally useful in three situations; either you have a Geddei Processor class with extra functionality on its interface that simply cannot be accessed over rGeddei, or you have a locally defined Geddei Processor object that you don't want to have to propogate to the plugin system to use (perhas because you're busy in development), or finally perhaps you want to use Processor objects on the local machine but don't want to have to run a whole other nodeserver.

Because of this, rGeddei allows locally created Geddei Processor objects to be introduced directly into rGeddei with no Factory/plugin middleman.


Constructor & Destructor Documentation

rGeddei::LocalProcessor::~LocalProcessor (  )  [virtual]

Default destructor.


Member Function Documentation

const bool rGeddei::LocalProcessor::connect ( const uint  sourceIndex,
const LocalProcessor sink,
const uint  sinkIndex,
const uint  bufferSize = 1 
) [virtual]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Attempts to create a connection between the Processor object this represents and another LocalProcessor object.

The connection will be formed between the output port of index sourceIndex of the Processor object this represents and the input port sinkIndex of the Processor represented by the LocalProcessor sink.

Parameters:
sourceIndex The index of the output port on this side of the connection.
sink The LocalProcessor object to whose Processor object we wish to connect.
sinkIndex The index of the input port on the opposite side of the connection.
bufferSize A minimum size of Buffer. Leave this at 1 unless you have a good reason not to.
Returns:
true if the connection succeeded.
See also:
Geddei::Processor::connect()

Implements rGeddei::AbstractProcessor.

const bool rGeddei::LocalProcessor::connect ( const uint  sourceIndex,
const RemoteProcessor sink,
const uint  sinkIndex,
const uint  bufferSize = 1 
) [virtual]

Attempts to create a connection between the Processor object this represents and another RemoteProcessor object.

The connection will be formed between the output port of index sourceIndex of the Processor object this represents and the input port sinkIndex of the Processor represented by the RemoteProcessor sink.

Parameters:
sourceIndex The index of the output port on this side of the connection.
sink The RemoteProcessor object to whose Processor object we wish to connect.
sinkIndex The index of the input port on the opposite side of the connection.
bufferSize A minimum size of Buffer. Leave this at 1 unless you have a good reason not to.
Returns:
true if the connection succeeded.
See also:
Geddei::Processor::connect()

Implements rGeddei::AbstractProcessor.

void rGeddei::LocalProcessor::disconnect ( const uint  sourceIndex  )  [virtual]

Disguard all connections going from a given port (generally only one, unless the port has a split() or share() operation carried out on it).

Parameters:
sourceIndex The output port from whom all connection are to be destroyed.
See also:
Geddei::Processor::disconnect()

Implements rGeddei::AbstractProcessor.

void rGeddei::LocalProcessor::disconnectAll (  )  [virtual]

Disguard all connections going from this object.

See also:
Geddei::Processor::disconnectAll()

Implements rGeddei::AbstractProcessor.

virtual const bool rGeddei::LocalProcessor::go (  )  [inline, virtual]

Sends a message to the Processor object that this represents, telling it to start.

Returns:
true iff the Processor was primed to start OK.
See also:
Geddei::Processor::go()

Implements rGeddei::AbstractProcessor.

virtual const QString rGeddei::LocalProcessor::name (  )  const [inline, virtual]

Retreive the unique identifier of this object.

Returns:
The name of the Processor object this represents, and by extension, this object.
See also:
Geddei::Processor::name()

Implements rGeddei::AbstractProcessor.

virtual void rGeddei::LocalProcessor::reset (  )  [inline, virtual]

Sends a message to the Processor object that this represents, telling it to reset.

See also:
Geddei::Processor::reset()

Implements rGeddei::AbstractProcessor.

virtual void rGeddei::LocalProcessor::share ( const uint  sourceIndex  )  [inline, virtual]

Sends a message to the Processor object that this represents, telling it to share the output port sourceIndex.

Parameters:
sourceIndex The output port index to be share.
See also:
Geddei::Processor::share()

Implements rGeddei::AbstractProcessor.

virtual void rGeddei::LocalProcessor::split ( const uint  sourceIndex  )  [inline, virtual]

Sends a message to the Processor object that this represents, telling it to split the output port sourceIndex.

Parameters:
sourceIndex The output port index to be split.
See also:
Geddei::Processor::split()

Implements rGeddei::AbstractProcessor.

virtual void rGeddei::LocalProcessor::stop (  )  [inline, virtual]

Sends a message to the Processor object that this represents, telling it to stop.

See also:
Geddei::Processor::stop()

Implements rGeddei::AbstractProcessor.

virtual void rGeddei::LocalProcessor::waitUntilDone (  )  [inline, virtual]

Sends a message to the Processor object that this represents, telling it to wait until the processor() operation has completed.

See also:
Geddei::Processor::waitUntilDone()

Implements rGeddei::AbstractProcessor.

virtual const Processor::ErrorType rGeddei::LocalProcessor::waitUntilGoing ( int *  errorData = 0  )  [inline, virtual]

Sends a message to the Processor object that this represents, telling it to wait until the start() operation has completed.

Parameters:
errorData Pointer to an integer, which if non-zero will be filled with some data pertaining to the error (if any) that occured in starting the Processor object.
Returns:
A Geddei::Processor::ErrorType value describing the type of error (if any that occured in starting the Processor object.
See also:
Geddei::Processor::waitUntilGoing()

Implements rGeddei::AbstractProcessor.


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