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

STypeInfo Class Reference

#include <STypeInfo.h>

Inherited by SEnvironment, SJob, SPrecRelation, and STopology.

Inheritance diagram for STypeInfo:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual leda_string getClassifier () const=0
virtual bool isInstanceOf (const leda_string &classifier) const=0
virtual void assureInstanceOf (const leda_string &classifier) const=0

Detailed Description

A small typechecking-system for the classes which are part of the general classification scheme. To use it, inherit from STypeInfo and include one of the macros TYPEINFO0,1,2 or 3 -- depending on the number of classes from which you are subclassing -- as the first statement in the class declaration. Include TYPEINFOVAR in the corresponding .cpp file.
See also:
TYPEINFO0 , TYPEINFO1 , TYPEINFO3 , TYPEINFOVAR


Member Function Documentation

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

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

virtual leda_string STypeInfo::getClassifier   [pure virtual]
 

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

Returns:
classifier string

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

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


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