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

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

#include <abstractprocessorgroup.h>

List of all members.

Public Member Functions

 AbstractProcessorGroup ()
void deleteAll ()
void disconnectAll ()
AbstractDomProcessordom (const QString &name)
const bool exists (const QString &name)
AbstractProcessorget (const QString &name)
const bool go (const bool waitUntilGoing=true) const
void init () const
AbstractProcessoroperator[] (const QString &name)
void reset () const
void stop (const bool resetToo=true) const
const Processor::ErrorType waitUntilGoing (AbstractProcessor **errorProc=0, int *errorData=0) const
 ~AbstractProcessorGroup ()

Friends

class AbstractProcessor


Detailed Description

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

Author:
Gav Wood <gav@cs.york.ac.uk>
Similar in essence to Geddei's ProcessorGroup class, this class allows several Processor objects to be controlled simultaneously. They may be easily started, stopped and deleted. This helps enormously with managing your AbstractProcessors.

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


Constructor & Destructor Documentation

rGeddei::AbstractProcessorGroup::AbstractProcessorGroup (  ) 

Basic constructor.

rGeddei::AbstractProcessorGroup::~AbstractProcessorGroup (  ) 

Default destructor.


Member Function Documentation

void rGeddei::AbstractProcessorGroup::init (  )  const

Call AbstractProcessor::init() on all AbstractProcessor objects in the group with only the default arguments.

All properties will be default, and all names unique but unknown.

Note:
This is rarely used, since the usual workflow involves setting an AbstractProcessor object's group with the call to AbstractProcessor::init(). However in some situations this call may still be useful.

const bool rGeddei::AbstractProcessorGroup::go ( const bool  waitUntilGoing = true  )  const

Start all represented Processor objects processing. See Geddei::Processor::go() and AbstractProcessor::go() for more information.

Parameters:
waitUntilGoing If true, this call should block until all involved Processor objects are either running or have failed to start.
Returns:
true if the operation succeeded.

const Processor::ErrorType rGeddei::AbstractProcessorGroup::waitUntilGoing ( AbstractProcessor **  errorProc = 0,
int *  errorData = 0 
) const

Block until all represented Processor objects are started or have failed to start.

Parameters:
errorProc If non-zero, specifies a location at which a pointer to the offending AbstractProcessor object, if existant, will be stored.
errorData If non-zero, specifies a location at which an integer coded description of the error, if existant, will be stored.
Returns:
The type of error that occured (if existant), coded as a Geddei::Processor::ErrorType enumeration.

void rGeddei::AbstractProcessorGroup::stop ( const bool  resetToo = true  )  const

Stop all represented Processor objects immediately. See Geddei::Processor::stop() and AbstractProcessor::stop() for more information.

Parameters:
resetToo Conduct a reset of all processors as well. Leave as true unless you know what you're doing.

void rGeddei::AbstractProcessorGroup::reset (  )  const

Resets all Processor objects in the group. They must already be stop()ed. See Geddei::Processor::reset() and AbstractProcessor::reset() for more information.

See also:
stop()

void rGeddei::AbstractProcessorGroup::disconnectAll (  ) 

Disconnect all represented Processor objects immediately. See Geddei::Processor::disconnectAll() for more information.

void rGeddei::AbstractProcessorGroup::deleteAll (  ) 

Delete all AbstractProcessor objects in this group.

const bool rGeddei::AbstractProcessorGroup::exists ( const QString &  name  ) 

Check whether an AbstractProcessor object of name name exists in this group.

Parameters:
name The name to be checked for.
Returns:
true iff the object of name name exists in this group.

AbstractProcessor & rGeddei::AbstractProcessorGroup::get ( const QString &  name  ) 

Retreive the AbstractProcessor object of name name.

Note:
Do not call this method if no AbstractProcessor of name name exists in this group.
Parameters:
name The name of the AbstractProcessor to be retrieved.
Returns:
Reference to the AbstractProcessor of name name.
See also:
operator[]()

AbstractDomProcessor & rGeddei::AbstractProcessorGroup::dom ( const QString &  name  ) 

Retreive the AbstractDomProcessor object of name name.

Note:
Do not call this method if no AbstractDomProcessor of name name exists in this group.
Parameters:
name The name of the AbstractDomProcessor to be retrieved.
Returns:
Reference to the AbstractDomProcessor of name name.
See also:
operator[]()

get()

AbstractProcessor& rGeddei::AbstractProcessorGroup::operator[] ( const QString &  name  )  [inline]

Array subscript operator. Semantically equivalent to get().

Parameters:
name The name of the AbstractProcessor to be retrieved.
Returns:
Reference to the AbstractProcessor of name name.
See also:
get()


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