#import <tipe.h>
Inheritance diagram for ObjectTipe:
Public Member Functions | |
(void) | - parent: |
sets parent tipe for this object. | |
(id) | - parent |
returns parent tipe for this object. | |
(id) | - parentTipe: |
returns parent tipe for some level. | |
(int) | - fieldOrder: |
Number of inheritance levels for field definition. | |
(char *) | - classname |
getter for class name of this type | |
(void) | - classname: |
getter for class name of this type | |
(void) | - method: |
Indicates this type implements some method. | |
(BOOL) | - hasMethod: |
Indicates this class implements this method itself without inheriting. | |
(int) | - findMethod: |
Finds the inheritance level for this method. | |
Protected Attributes | |
ObjectTipe * | parent |
char * | name |
SymTable * | methods |
A few methods of this class talk about "inheritance levels". This is because we implement inheritance in C by containing the parent class. To access an inherited field, we must access this parent struct (ie instance.parent.fieldname). The mechanism for inherited methods is similar.
- (void) parent: | (id) | p |
sets parent tipe for this object.
- (id) parent |
returns parent tipe for this object.
- (id) parentTipe: | (int) | level |
returns parent tipe for some level.
The | level up the inheritance tree to look |
- (int) fieldOrder: | (char *) | f |
Number of inheritance levels for field definition.
f | The name of the field. | |
Number | of levels up the inhertance tree in which the field is define. |
- (BOOL) hasMethod: | (char *) | msg |
Indicates this class implements this method itself without inheriting.
- (int) findMethod: | (char *) | msg |
Finds the inheritance level for this method.