]> git.donarmstrong.com Git - lilypond.git/commit
Issue 4082/1: Reimplement Smobs via templates rather than preprocessor
authorDavid Kastrup <dak@gnu.org>
Mon, 25 Aug 2014 15:46:29 +0000 (17:46 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 1 Sep 2014 13:11:34 +0000 (15:11 +0200)
commit90d1cf58a1f5c2f75bf4ace43911c4b6d33245da
tree95618dcf37d896c1c492a4ae68a31fb63d87864e
parentc024c17a1c1c761b9d34193e82b38e968a3edb74
Issue 4082/1: Reimplement Smobs via templates rather than preprocessor

This creates the underlying code for the new implementation without
converting the bulk of the code (which is left to a script committed
separately).  The include file ly-smobs.icc is removed completely.  A
new file smobs.tcc contains generic template instantiations.  The GCC
implementation works by loading it unconditionally in smobs.hh.
Depending on the underlying template mechanism, it might be feasible to
include it into just one compilation unit.

Where the previous implementation referred to class names passed into
macros, the typeinfo mechanism of C++ is employed for deriving the
respective name.  The GCC implementation uses some cursory demangling of
the resulting type id, converting "3Box" into "Box" and similarly.
Other APIs might warrant different polishing but the type names are
mostly used for internal purposes and differences are not all that
problematic.
lily/include/ly-smobs.icc [deleted file]
lily/include/smobs.hh
lily/include/smobs.tcc [new file with mode: 0644]