#import <typecheck.h>
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 | |
ClassType pulls together all other objects that describe a Class.
| - (void) setInterface: | (Interface *) | i |
Sets the interface for the class.
| - (void) setImplementation: | (Implementation *) | i |
Sets the implementation 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.
1.5.2