The patch attached reduces file dependencies in the frontends enormously by moving template class declarations into three new .tmpl files and only including these files in the .C files of the derived classes.
Changing anything in ButtonController.h, ControlDialogs.h or ControlInset.h
results in the recompilation of 56, 29 and 31 files, respectively! Since
these files contained not only the class definition, but the class
declaration also, such changes occurred relatively frequently. Now that the
declaration of the functions has been moved into the .tmpl files, here are
the stats:
touch frontends/controllers/ButtonController.tmpl and recompile
frontends/xforms/Dialogs.C
frontends/xforms/xformsBC.C
touch frontends/controllers/ControlDialog.tmpl and recompile
frontends/controllers/ControlDialog_impl.C
touch frontends/controllers/ControlInset.tmpl and recompile
frontends/controllers/ControlCommand.C
frontends/controllers/ControlError.C
frontends/controllers/ControlERT.C
frontends/controllers/ControlExternal.C
frontends/controllers/ControlFloat.C
frontends/controllers/ControlGraphics.C
frontends/controllers/ControlInclude.C
frontends/controllers/ControlMinipage.C
So the advantage is clear. Nonetheless, I attach the patch, rather than
submit immediately, so that the experts can have a look first. Please do so!
Note that the changes to the gui-specific frontends code is minimal. See the
xforms ChangeLog entry.
One small question. Should I put the three .tmpl files in
frontends/controllers/Makefile.am?
Regards,
Angus
dependencies.diff.bz2
Description: BZip2 compressed data
