Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

CCM::Class Class Reference

List of all members.

Detailed Description

Represents a class.


Public Member Functions

 Class (string name, List attrs, string parent)
 Create a new class.

 Class (Class c)
 Instantiate an object of this class by sharing methods, ctors and attributes and deep-copying the fields.

string getName ()
 Return the class name.

string parentClass ()
 Return the class name this class is derived from.

void addConstructor (Method m)
 Add given method as a constructor.

bool addMethod (Method method)
 Add given method.

void delMethod (Method m)
 Delete the given method from this class.

Method getMethod (string name, IList args)
 Returns the method that matches given name and parameters (proper values, or Expr derivatives).

void addField (Variable f)
 Add given variable as class field.

Variable getField (string name)
 Return field with given name (or null if such a field does not exist).

void addInitStatement (Statement s)
 Add statement that must be executed in every constructor.

Attribute getAttribute (string name)
 Return attribute with given name (or null if such an attribute does not exist).

IList attrMethods (string attr)
 Return all methods that have the given attribute.

void construct (IList args)
bool constructible (IList args)
 Return whether any class ctor is callable with arguments args (which must be either proper values or Expr derivatives).

override string ToString ()
void becomeCurrentClass ()
 Set this class as the current class.

StateNode getState ()
 Create a state process node from the current field values.

void setState (StateNode sn)
 Set the fields to the values given in the state node.

IList stateFormat ()
 Return a list of variable names which describes the format of generated state nodes.

StateAbstraction getStateAbstraction ()
 Calculate state abstraction equivalence relation from attributes.

TransitionAbstraction getTransitionAbstraction ()
 Calculate transition abstraction equivalence relation from attributes.


Static Public Member Functions

Class currentClass ()
 Return the currently active class.


Private Member Functions

void parseEqAttr (Attribute a, EqRel eq)
 Parse given Eq attribute and update given EqRel accordingly.

Range parseRange (string r)
 Parse given range string.

Object parseBound (string bound)
void addCCMCompMembers ()
 Add the CCM specific members for class "Comp".

void addCCMStubMembers ()

Private Attributes

string name
string parent
IList ctors
IList methods
Hashtable fields
List attrs
IList initStatements
bool isStub
 True if this is a Stub class, false in other classes.


Static Private Attributes

Class currClass = null


Constructor & Destructor Documentation

CCM::Class::Class string  name,
List  attrs,
string  parent
 

Create a new class.

Parameters:
name Class name.
attrs List of Attributes of this class
parent Name of the class this class is derived from.

CCM::Class::Class Class  c  ) 
 

Instantiate an object of this class by sharing methods, ctors and attributes and deep-copying the fields.


Member Function Documentation

void CCM::Class::addCCMCompMembers  )  [private]
 

Add the CCM specific members for class "Comp".

void CCM::Class::addCCMStubMembers  )  [private]
 

void CCM::Class::addConstructor Method  m  ) 
 

Add given method as a constructor.

void CCM::Class::addField Variable  f  ) 
 

Add given variable as class field.

void CCM::Class::addInitStatement Statement  s  ) 
 

Add statement that must be executed in every constructor.

Used to initialize fields.

bool CCM::Class::addMethod Method  method  ) 
 

Add given method.

Returns:
true on success or false if a method with the same name and parameters already exists.

IList CCM::Class::attrMethods string  attr  ) 
 

Return all methods that have the given attribute.

void CCM::Class::becomeCurrentClass  ) 
 

Set this class as the current class.

This must be done when evaluating the possible values of a stub property, to allow reading the value of a stub field for dynamic bounds.

See also:
Expr.doID

void CCM::Class::construct IList  args  ) 
 

bool CCM::Class::constructible IList  args  ) 
 

Return whether any class ctor is callable with arguments args (which must be either proper values or Expr derivatives).

Class CCM::Class::currentClass  )  [static]
 

Return the currently active class.

void CCM::Class::delMethod Method  m  ) 
 

Delete the given method from this class.

This is necessary for parsing when the parser discovers that a declared method has no body.

Attribute CCM::Class::getAttribute string  name  ) 
 

Return attribute with given name (or null if such an attribute does not exist).

Variable CCM::Class::getField string  name  ) 
 

Return field with given name (or null if such a field does not exist).

Method CCM::Class::getMethod string  name,
IList  args
 

Returns the method that matches given name and parameters (proper values, or Expr derivatives).

string CCM::Class::getName  ) 
 

Return the class name.

StateNode CCM::Class::getState  ) 
 

Create a state process node from the current field values.

Stub references are stored as a string containing the class name, to avoid serializing classes.

StateAbstraction CCM::Class::getStateAbstraction  ) 
 

Calculate state abstraction equivalence relation from attributes.

TransitionAbstraction CCM::Class::getTransitionAbstraction  ) 
 

Calculate transition abstraction equivalence relation from attributes.

string CCM::Class::parentClass  ) 
 

Return the class name this class is derived from.

Object CCM::Class::parseBound string  bound  )  [private]
 

void CCM::Class::parseEqAttr Attribute  a,
EqRel  eq
[private]
 

Parse given Eq attribute and update given EqRel accordingly.

Range CCM::Class::parseRange string  r  )  [private]
 

Parse given range string.

void CCM::Class::setState StateNode  sn  ) 
 

Set the fields to the values given in the state node.

Does not replace Stub references since only their class names are stored in the StateNode.

IList CCM::Class::stateFormat  ) 
 

Return a list of variable names which describes the format of generated state nodes.

override string CCM::Class::ToString  ) 
 


Member Data Documentation

List CCM::Class::attrs [private]
 

IList CCM::Class::ctors [private]
 

Class CCM::Class::currClass = null [static, private]
 

Hashtable CCM::Class::fields [private]
 

IList CCM::Class::initStatements [private]
 

bool CCM::Class::isStub [private]
 

True if this is a Stub class, false in other classes.

IList CCM::Class::methods [private]
 

string CCM::Class::name [private]
 

string CCM::Class::parent [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Jun 21 01:20:50 2004 for cs2ccmb by doxygen 1.3.7