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

SSingleTopology Class Reference

#include <SSingleTopology.h>

Inherits SSetTopology, and SLineTopology.

Inheritance diagram for SSingleTopology:

Inheritance graph
[legend]
List of all members.

Public Methods

 SSingleTopology ()
virtual ~SSingleTopology ()
virtual STopologyModgetModifier ()
virtual bool intersectsWith (const STopology &container, const STopology &top, int ownPos, int topPos) const
virtual bool contains (const STopology &container, const STopology &top, int ownPos, int topPos) const
virtual int getCount () const
virtual int getIDAt (int pos) const
virtual int getPos (int ID) const
virtual bool isPosFree (int pos) const
virtual leda_list< int > getFreePos () const
virtual bool canEmbedAt (const STopology &top, int pos) const
virtual leda_list< int > canEmbedAt (const STopology &top) const
virtual void embed (const STopology &top, int pos, int ID)
virtual void remove (int ID)
virtual bool fitsInto (const STopology *top) const
virtual void embed (const STopology &top, const SComplexPosition *pComplexPos, int ID)
virtual leda_list< int > getEmbeddedIDs () const
virtual void clear ()
virtual leda_string getClassifier () const=0
virtual bool isInstanceOf (const leda_string &classifier) const=0
virtual void assureInstanceOf (const leda_string &classifier) const=0
void addObserver (SObserver &obs)
void deleteObserver (SObserver &obs)
void notifyObservers (const SEvent &event)
virtual int getWidth () const
virtual int getHeight () const
virtual int getDim () const
virtual SDimArray getSize () const
virtual bool canEmbedAt (const SComplexPosition &rHcPos) const
virtual void embed (const STopology &top, const SComplexPosition *pMeshNPos, int ID)
virtual void clear ()

Protected Methods

void setSize (int width, int height)
void setSize (SDimArray &newSize)

Protected Attributes

SDimArray _size
leda_h_array< int, SMeshNEntry * > _IDtoEntry

Static Protected Attributes

SMeshNEntry _defaultEntry

Friends

class SSingleTopologyMod

Detailed Description

Single topology, its classifier is "single". A single topology consists of only one position, of course. Access the modifier to set properties.
See also:
SSingleTopologyMod


Constructor & Destructor Documentation

SSingleTopology::SSingleTopology  
 

Constructor

virtual SSingleTopology::~SSingleTopology   [inline, 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

virtual void STypeInfo::assureInstanceOf const leda_string &    classifier const [pure virtual, inherited]
 

The same as isInstanceOf(), only that the program is stopped with an error in case of failure

Parameters:
classifier  e.g. "P", "Q", "R", etc

bool SMeshN::canEmbedAt const SComplexPosition   rHcPos const [virtual, inherited]
 

virtual leda_list<int> SSingleTopology::canEmbedAt const STopology   top const [inline, virtual]
 

Return a list of all positions where the topology may be embedded. Default implementation: just call canEmbedAt for all free positions

Parameters:
top  topology
Returns:
list of positions

Reimplemented from SSetTopology.

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

Return whether the topology can be embedded at a certain position

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

Reimplemented from SSetTopology.

void SMeshN::clear   [virtual, inherited]
 

Remove all embedded objects.

Reimplemented from STopology.

void STopology::clear   [virtual, inherited]
 

Remove all embedded objects. Attention: This method has a very inefficient default implementation.

Reimplemented in SHypercube, and SMeshN.

bool SSingleTopology::contains const STopology   container,
const STopology   top,
int    ownPos,
int    topPos
const [virtual]
 

Return whether a topology contains another topology.

Parameters:
container  all positions are defined relatively to this "surrounding" topology
top  the topology which shall be checked if it is contained in *this
ownPos  where *this is embedded in container
topPos  where top is embedded in container
Returns:
true if ownPos is equal to topPos, otherwise false

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

void SMeshN::embed const STopology   top,
const SComplexPosition   pMeshNPos,
int    ID
[virtual, inherited]
 

Reimplemented from STopology.

virtual void STopology::embed const STopology   top,
const SComplexPosition   pComplexPos,
int    ID
[inline, virtual, inherited]
 

Reimplemented in SHypercube, and SMeshN.

virtual void SSingleTopology::embed const STopology   top,
int    pos,
int    ID
[inline, virtual]
 

Embed a topology.

Parameters:
top  topology
pos  position where topology is embedded
ID  ID of the embedded topology

Reimplemented from SSetTopology.

virtual bool SSingleTopology::fitsInto const STopology   top const [inline, virtual]
 

Test whether this Topology is at most as large as another

Parameters:
top  topology to compare with

Reimplemented from SSetTopology.

virtual leda_string STypeInfo::getClassifier   [pure virtual, inherited]
 

Get the classifier of the object, using the classification scheme. E.g. "P" for Identical Processors

Returns:
classifier string

virtual int SSingleTopology::getCount   const [inline, virtual]
 

Return the number of positions in the linearized representation. Only positions 0..getCount()-1 are allowed.

Returns:
1

Reimplemented from SSetTopology.

virtual int SMeshN::getDim   const [inline, virtual, inherited]
 

Get dimension of mesh

Returns:
dimension of the mesh

leda_list< int > STopology::getEmbeddedIDs   [virtual, inherited]
 

Get all IDs that are currently embedded in the topology. Attention: This method has a very inefficient default implementation.

Returns:
list of embedded IDs

virtual leda_list<int> SSingleTopology::getFreePos   const [inline, virtual]
 

Return whether no topology overlaps with 'pos'

Parameters:
pos  position
Returns:
true if no topology overlaps with 'pos', otherise false

Reimplemented from SSetTopology.

virtual int SMeshTopology::getHeight   const [inline, virtual, inherited]
 

Get height of mesh

Returns:
height of mesh

virtual int SSingleTopology::getIDAt int    pos const [inline, virtual]
 

Return ID of the topology which is overlapping position 'pos'

Parameters:
pos  position
Returns:
topology ID (-1 if none)

Reimplemented from SSetTopology.

virtual STopologyMod& SSingleTopology::getModifier   [inline, virtual]
 

Get access to the modifier

Reimplemented from SLineTopology.

virtual int SSingleTopology::getPos int    ID const [inline, virtual]
 

Return position at which the topology with id 'ID' is currently embedded

Parameters:
ID  topology ID
Returns:
position

Reimplemented from SSetTopology.

virtual SDimArray SMeshN::getSize   const [inline, virtual, inherited]
 

Get size of mesh

Returns:
size of mesh

virtual int SMeshTopology::getWidth   const [inline, virtual, inherited]
 

Get width of mesh

Returns:
width of mesh

bool SSingleTopology::intersectsWith const STopology   container,
const STopology   top,
int    ownPos,
int    topPos
const [virtual]
 

Return whether topologies intersect

Parameters:
container  all positions are defined relatively to this "surrounding" topology
top  the topology which shall be checked for intersection
ownPos  where *this is embedded in container
topPos  where top is embedded in container
Returns:
true, if ownPos is equal to topPos, otherwise false

virtual bool STypeInfo::isInstanceOf const leda_string &    classifier const [pure virtual, inherited]
 

Checks whether the object is an instance of the specified or a specialized class

Parameters:
classifier  e.g. "P", "Q", "R", etc
Returns:
true if the object can be casted to the specified class

virtual bool SSingleTopology::isPosFree int    pos const [inline, virtual]
 

Return whether no topology overlaps with 'pos'

Parameters:
pos  position
Returns:
true if no topology overlaps with 'pos', otherise false

Reimplemented from SSetTopology.

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

virtual void SSingleTopology::remove int    ID [inline, virtual]
 

Reverse the embedding

Parameters:
ID  ID of topology

Reimplemented from SSetTopology.

void SMeshN::setSize SDimArray   newSize [protected, inherited]
 

void SMeshTopology::setSize int    width,
int    height
[protected, inherited]
 


Friends And Related Function Documentation

friend class SSingleTopologyMod [friend]
 


Member Data Documentation

SMeshNEntry SMeshN::_defaultEntry [static, protected, inherited]
 

leda_h_array<int, SMeshNEntry*> SMeshN::_IDtoEntry [protected, inherited]
 

SDimArray SMeshN::_size [protected, inherited]
 


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