Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SPassiveMachines Class Reference

#include <SPassiveMachines.h>

Inherits SObservable.

Inherited by SMachines.

Inheritance diagram for SPassiveMachines:

Inheritance graph
[legend]
List of all members.

Public Types

typedef leda_dictionary< int,
SJobExecInfo * > 
MapJobToInfo

Public Methods

 SPassiveMachines ()
virtual ~SPassiveMachines ()
SPassiveMachines & operator= (SPassiveMachines &)
void reset ()
STopologygetTopology () const
bool isAllocated (const SJob &job) const
bool isMachFree (int pos)
const leda_set< SJob * > & getAllocatedJobs () const
int getPos (const SJob &job) const
double getStartOfAlloc (const SJob &job) const
leda_list< int > getFreeMachines () const
bool canEmbedAt (const STopology &top, int pos) const
virtual void allocate (SJob &job, int pos=-1)
virtual void allocate (SJob &job, SComplexPosition *pComplexPos=NULL)
virtual void deallocate (SJob &job)
virtual void simulate (double oldTime, double newTime)
virtual double getNextEventTime (double currTime) const
virtual SPassiveMachinesModgetModifier ()
void addObserver (SObserver &obs)
void deleteObserver (SObserver &obs)
void notifyObservers (const SEvent &event)

Protected Methods

SJobExecInfogetInfo (const SJob &job)
const SJobExecInfogetInfo (const SJob &job) const

Protected Attributes

STaskSystem_pTaskSys

Friends

class SPassiveMachinesMod

Detailed Description

Base class for all kind of resources. "Normal" machines are derived from this class. Passive machines cannot process jobs, but in all other respects they are identical to "normal" machines. A job may need several machines, the position of a job is the machine where the job has its origin Access the modifier to set properties.
See also:
SPassiveMachinesMod , SMachines


Member Typedef Documentation

typedef leda_dictionary<int, SJobExecInfo*> SPassiveMachines::MapJobToInfo
 


Constructor & Destructor Documentation

SPassiveMachines::SPassiveMachines  
 

Constructor

SPassiveMachines::~SPassiveMachines   [virtual]
 

Destructor


Member Function Documentation

void SObservable::addObserver SObserver   obs [inline, inherited]
 

Here another component can register himself as observer of this component

Parameters:
obs  observer that wants to be notified of events created by this class

void SPassiveMachines::allocate SJob   job,
SComplexPosition   pComplexPos = NULL
[virtual]
 

Reimplemented in SMachines.

void SPassiveMachines::allocate SJob   job,
int    pos = -1
[virtual]
 

Allocate a job. Also changes the state of the job.

Parameters:
job  job to be allocated
pos  position where the topology of job shall be embedded. The default value is only valid if the machines have a SSetTopology! (in a set topology you don't want to specify the position. all positions are equivalent.)

Reimplemented in SMachines.

bool SPassiveMachines::canEmbedAt const STopology   top,
int    pos
const [inline]
 

Return whether a topology could be embedded at a certain position

Parameters:
top  topology
pos  position
Returns:
true, if could be embedded, otherwise false

void SPassiveMachines::deallocate SJob   job [virtual]
 

Deallocate a job from machine. Also changes the state of the job.

Parameters:
job  job to be deallocated

Reimplemented in SMachines.

void SObservable::deleteObserver SObserver   obs [inline, inherited]
 

Here another component can delete himself from the list of observers of this component

Parameters:
obs  observer that doesn't want to be notified anymore

const leda_set<SJob*>& SPassiveMachines::getAllocatedJobs   const [inline]
 

Get all currently allocated jobs

leda_list<int> SPassiveMachines::getFreeMachines   const [inline]
 

Get a list of all machines where no job (or part of a job) is running

const SJobExecInfo& SPassiveMachines::getInfo const SJob   job const [inline, protected]
 

Get read-only access to information about the allocation of a job

SJobExecInfo& SPassiveMachines::getInfo const SJob   job [inline, protected]
 

Get access to information about the allocation of a job

virtual SPassiveMachinesMod& SPassiveMachines::getModifier   [inline, virtual]
 

Get access to the modifier

Reimplemented in SMachines.

virtual double SPassiveMachines::getNextEventTime double    currTime const [inline, virtual]
 

Return the time, when the next event will be generated the job. Passive machines do not generate events, so there is no time, when an event could occur.

Parameters:
currTime  the current simulation time (only events happening later are interesting)
Returns:
MAXDOUBLE

Reimplemented in SMachines.

int SPassiveMachines::getPos const SJob   job const [inline]
 

Return the position where a job is currently embedded

Parameters:
job  job
Returns:
position in topology

double SPassiveMachines::getStartOfAlloc const SJob   job const
 

Return the time when the job was allocated to the machine

STopology& SPassiveMachines::getTopology   const [inline]
 

Get access to the topology of the machines. It contains information about the embedded jobs.

bool SPassiveMachines::isAllocated const SJob   job const
 

Return whether a job is allocated on a machine

Parameters:
job  job
Returns:
true, if allocated, otherwise false

bool SPassiveMachines::isMachFree int    pos
 

No descriptions

void SObservable::notifyObservers const SEvent   event [inline, inherited]
 

Inform all observers of this component about an event. The Observers will receive this event by their SObserver::update()-method.

Parameters:
event  an event that is sent to all observers of this component
See also:
SObserver::update()

SPassiveMachines& SPassiveMachines::operator= SPassiveMachines &   
 

void SPassiveMachines::reset  
 

Reset machines. Allocated jobs will be deallocated and the topology is resetted.

virtual void SPassiveMachines::simulate double    oldTime,
double    newTime
[inline, virtual]
 

Advance the simulation time until the next time step. In the standard implementation passive machines do not generate events. Well, they are passive, aren't they? So, this method will do nothing at all.

Parameters:
oldTime  the time from which the simulation time is advanced.
newTime  the time up to which the simulation time is advanced.

Reimplemented in SMachines.


Friends And Related Function Documentation

friend class SPassiveMachinesMod [friend]
 


Member Data Documentation

STaskSystem* SPassiveMachines::_pTaskSys [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu May 22 16:50:51 2003 for Sketch-it! by doxygen1.2.18