ClassType Class Reference

Manages type information for a class. More...

#import <typecheck.h>

List of all members.

Public Member Functions

(void) - setInterface:
 Sets the interface for the class.
(void) - setImplementation:
 Sets the implementation for the class.
(void) - setSuper:
 Sets the super ClassType for the class.
(void) - addField:tipe:
 Adds a field to the class.
(void) - addInstMethods::
(void) - addClassMethods::
(char *) - classname
 Returns the name of the class.
(ObjectTipe *) - tipe
 Returns the ObjectTipe for the class.
(Implementation *) - impl
 Returns the Implmentation AST node for the class.
(Interface *) - iface
 Returns the Interface AST node for the class.
(int) - findField:
 >=0 if we have field
(BOOL) - hasField:
 Determines if field is in this particular class.
(ClassType *) - parent
(BOOL) - hasClassMethod:
(Method *) - getClassMethod:
(Method *) - findClassMethod:
 Returns classname for method, or NULL.

Protected Attributes

BOOL seenInterface
 set when interface encountered
BOOL seenImplementation
 set when implementation encountered
SymTable * fields
 fields of each instance
SymTable * instMethods
 instance methods
SymTable * classMethods
 class methods
Interface * iface
 pointer to Interface AST node
Implementation * impl
 pointer to Implementation AST node
ClassType * parent
 parent ClassType
ObjectTipe * tipe
 our Tipe used for expression typechecking


Detailed Description

Manages type information for a class.

ClassType pulls together all other objects that describe a Class.

Bug:
There is some duplication of effor with ObjectTipe that could use some refactoring to eliminate.


Member Function Documentation

- (void) setInterface: (Interface *)  i  

Sets the interface for the class.

- (void) setImplementation: (Implementation *)  i  

Sets the implementation for the class.

- (void) setSuper: (ClassType *)  i  

Sets the super ClassType for the class.

- (void) addField: (char *)  f
tipe: (Tipe *)  t 

Adds a field to the class.

- (char *) classname  

Returns the name of the class.

- (ObjectTipe*) tipe  

Returns the ObjectTipe for the class.

- (int) findField: (char *)  f  

>=0 if we have field

Field may be in ancestor of self. if so, returns ancestor level to look through.

- (BOOL) hasField: (char *)  f  

Determines if field is in this particular class.

Does not search super types.


The documentation for this class was generated from the following files:
Generated on Mon Dec 24 06:11:58 2007 for gfront by  doxygen 1.5.2