The <tt>ENDMODULE</tt> Statement



next up previous contents
Next: The SUBMODULE Statement Up: C.3 The VOOPS Syntax Previous: The MODULE Statement

The ENDMODULE Statement

 

Appearing at the end of the master template header file, this statement first sorts the internal association list of all known classes alphabetically by class name. Thus binary searches with class names can be performed, which is necessary for the support of unstructured PIF grid reading see Section 7.1.2. A list of all known methods is generated and reported together with the known classes. The method return types are checked for consistency, since all methods holding the same name have to have the same method return type, otherwise the resulting C code for the class table initialization would be semantically incorrect.

The actual code production starts with the C flag enumeration, where each flag is defined to be a TAC constant see Section 5.4. Flag manipulation macros for testing, setting, and clearing flags are defined afterwards.

A C union then combines all currently known classes and is typedefined to be the genuine object of the current module, and the pointer to this union is used for all object accesses. Object ID accessor macros are defined afterwards, as well as allocation, reallocation, and free macros. Bit conversion macros as well as class bit masks and inheritance masks follow.

Preceding the class table declaration, accessor macros to class table components, especially to all currently known method pointers, are defined. The class table data structure is then typedefined and declared extern in the master template header file. Finally, prototypes for generic default methods (see DEFAULTMETHODS) are inserted.



Martin Stiftinger
Tue Nov 29 19:41:50 MET 1994