gencls script.

Because of the complexity involved in managing PRIMA classes, as well as great uniformity of PRIMA methods declarations, the use of conventional xsubpp seems inappropriate. The gencls script has been written to automate thunks and VMTs generation.

Every PRIMA core class has a file with a cls extension, which describes the C fields and methods of the class. For instance:

   object Menu( AbstractMenu)
   {
      method Bool  get_selected();
      method void  set_selected( Bool selected);
      c_only void  update_sys_handle( HV * profile);
   }

Running gencls script on this file will produce two other files, Menu.h and Menu.inc, containing the definitions of VMT and VmtPatch for the Prima::Menu class, the declarations of Menu_methodname functions and declarations and definitions of Menu_methodname_FROMPERL and Menu_methodname_REDEFINED functions, together with a couple of auxiliary functions for registering the Prima::Menu class with the PRIMA core.