Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
::SHE+ILA:: classes are built from a Template or "Class Factory". It contains the default values of the member variables and base methods. We instantiate it by means of the "-::>" operator (sometimes written as "::->"). This creates a back pointer to the Template buf for each of the fields and methods. The name table in the Template is used, and the instance's name table is therefore omitted. We can also derive a class from the base class and override any method, by storing a local lambda rather than using the back pointer. Currently multiple-inheritance is not implemented however (see Turbo C manual and Stroustrup). The class factory is built in the same way that a normal buf is built, it does not contain any specila coding (except maybe a method called "CTOR" and one called "DTOR" if a constructor or destructor are required). Since all data is inline (rather than indirect), "new" and "delete" are rarely required (back-pointers are automatically handled by the system).