Geddei::ProcessorGroup Class Reference
[Geddei's core classes.]

A class to segment a number of Processor objects into a set. More...

#include <processorgroup.h>

Inheritance diagram for Geddei::ProcessorGroup:

Inheritance graph
[legend]
List of all members.

Public Member Functions

const bool confirmTypes () const
const uint count () const
void deleteAll ()
void disconnectAll ()
DomProcessordom (const QString &name)
const bool exists (const QString &name)
Processorget (const QString &name)
const bool go (const bool waitUntilGoing=true) const
Processoroperator[] (const QString &name)
 ProcessorGroup (const bool adopt=false)
void reset () const
void stop (const bool resetToo=true) const
const Processor::ErrorType waitUntilGoing (Processor **errorProc=0, int *errorData=0) const
 ~ProcessorGroup ()

Friends

class Processor

Detailed Description

A class to segment a number of Processor objects into a set.

Author:
Gav Wood <gav@cs.york.ac.uk>
This class allows several Processor objects to be controlled simultaneously. They may be easily started, stopped and deleted. This helps enormously with managing your Processors.

You may also treat it like an array using the array subscript operator ([]) to retrieve a particular Processor object reference through its name.


Constructor & Destructor Documentation

Geddei::ProcessorGroup::ProcessorGroup ( const bool  adopt = false  ) 

Default constructor.

Parameters:
adopt If true, this will adopt all the Processor objects and thus delete any left over on destruction.

Geddei::ProcessorGroup::~ProcessorGroup (  ) 

Default destructor.


Member Function Documentation

const bool Geddei::ProcessorGroup::confirmTypes (  )  const

Confirm the signal types of all connections of all Processor objects in this set.

Returns:
true iff all types confirm correctly.

const bool Geddei::ProcessorGroup::go ( const bool  waitUntilGoing = true  )  const

Start all Processor objects in the group. Note this returns once all have been "primed". If you want to wait until they are actually going (or not due to an error), use waitUntilGoing() as well, or specify true to waitUntilGoing.

Parameters:
waitUntilGoing If true, blocks until all Processor objects are started correctly or have otherwise failed.
Returns:
true if all Processor objects could be initially started correctly.
See also:
waitUntilGoing()

const Processor::ErrorType Geddei::ProcessorGroup::waitUntilGoing ( Processor **  errorProc = 0,
int *  errorData = 0 
) const

Waits for all Processor objects to be actaully running correctly. Use this only after a go() call that has returned true.

Parameters:
errorProc If supplied (and non-zero), populate with a pointer to the first Processor object that returned an error.
errorData If supplied (and non-zero), populate with any numeric data the error arose with.
Returns:
The Error it failed with or Processor::NoError if all went correctly.

void Geddei::ProcessorGroup::stop ( const bool  resetToo = true  )  const

Stops all Processor objects in the group.

Parameters:
resetToo If true, reset() all the Processor objects after stop()ing them. If unspecified, defaults to true.
See also:
reset()

void Geddei::ProcessorGroup::reset (  )  const

Resets all Processor objects in the group. They must already be stop()ed.

See also:
stop()

void Geddei::ProcessorGroup::deleteAll (  ) 

Deletes all Processor objects in the group.

void Geddei::ProcessorGroup::disconnectAll (  ) 

Disconnects all connections that are outgoing from any Processor objects in the group.

Note:
This means that if all existing connections are between Processor objects in this group, then all existing connections will be destroyed.

const bool Geddei::ProcessorGroup::exists ( const QString &  name  ) 

Checks for the existance of a named Processor in the group.

Parameters:
name The name of the Processor object to be found.
Returns:
true if a Processor object of name name is contained in the group.

Processor & Geddei::ProcessorGroup::get ( const QString &  name  ) 

Get a reference to a named Processor object. It must exist in the group.

Parameters:
name The name of the Processor object to be found.
Returns:
A reference to the Processor object of name name.

DomProcessor & Geddei::ProcessorGroup::dom ( const QString &  name  ) 

Get a reference to a named DomProcessor object. It must exist in the group.

Parameters:
name The name of the DomProcessor object to be found.
Returns:
A reference to the DomProcessor object of name name.

Processor& Geddei::ProcessorGroup::operator[] ( const QString &  name  )  [inline]

Get a reference to a named Processor object. It must exist in the group. This is a convenience method that does the same as get().

Parameters:
name The name of the Processor object to be found.
Returns:
A reference to the Processor object of name name.

const uint Geddei::ProcessorGroup::count (  )  const [inline]

Get the number of Processor objects in group.

Returns:
The number of Processor objects in the group.


The documentation for this class was generated from the following files:
Generated on Thu Jul 13 06:56:43 2006 for Exscalibar by  doxygen 1.4.7