Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(990)

Issue 235790043: Redesign listeners using templates (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years ago by dak
Modified:
8 years, 10 months ago
Reviewers:
benko.pal, janek, Dan Eble
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Redesign listeners using templates This is actually just a start since it does not touch most of the infrastructure for translators. Contains the following commits in reverse order: Remove Scheme listeners as they are just callbacks now. Reimplement Listener around generic SCM callback and instance Run preparatory script replacing listener macros This script is for i in $(git grep -l 'IMPLEMENT_LISTENER (') do sed -i '/IMPLEMENT_LISTENER ([^)]*$/{N;s/\n\s*/ /}' $i sedscript=$(git grep -h 'IMPLEMENT_LISTENER (' $i| sed 's|^.*IMPLEMENT_LISTENER (\([^,]*\), \([^)]*\)).*$|s/GET_LISTENER (\\([_a-z]\\+->\\)\\?\2)/\\1GET_LISTENER (\1, \2)/|') sed -i "$sedscript" $i done sed -i '/IMPLEMENT_LISTENER (/d' $(git grep -l 'IMPLEMENT_LISTENER (') sed -i 's/DECLARE_LISTENER (\([^)]*\));\?/void \1 (SCM);/' $(git grep -l 'DECLARE_LISTENER (') Make dispatchers callable for dispatching Move self_scm_ into non-templated Smob_core base class.

Patch Set 1 #

Total comments: 10

Patch Set 2 : Improve comment, cosmetic change #

Patch Set 3 : Fix naming conflict #

Patch Set 4 : Rebase on current master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -411 lines) Patch
M lily/context.cc View 1 2 3 8 chunks +7 lines, -13 lines 0 comments Download
M lily/dispatcher.cc View 1 2 3 7 chunks +16 lines, -10 lines 0 comments Download
M lily/dispatcher-scheme.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M lily/engraver-group.cc View 3 chunks +4 lines, -6 lines 0 comments Download
M lily/global-context.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M lily/grace-engraver.cc View 4 chunks +3 lines, -4 lines 0 comments Download
M lily/include/context.hh View 2 chunks +6 lines, -6 lines 0 comments Download
M lily/include/dispatcher.hh View 1 chunk +3 lines, -2 lines 0 comments Download
M lily/include/engraver-group.hh View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/include/global-context.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/include/listener.hh View 1 1 chunk +132 lines, -70 lines 0 comments Download
M lily/include/scheme-engraver.hh View 1 2 1 chunk +1 line, -1 line 0 comments Download
D lily/include/scheme-listener.hh View 1 chunk +0 lines, -41 lines 0 comments Download
M lily/include/score-engraver.hh View 1 chunk +3 lines, -3 lines 0 comments Download
M lily/include/score-performer.hh View 1 chunk +3 lines, -3 lines 0 comments Download
M lily/include/smobs.hh View 1 2 3 3 chunks +15 lines, -4 lines 0 comments Download
M lily/include/translator.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/include/translator.icc View 1 chunk +1 line, -2 lines 0 comments Download
M lily/include/translator-group.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/listener.cc View 1 2 3 1 chunk +1 line, -41 lines 0 comments Download
M lily/lyric-combine-music-iterator.cc View 5 chunks +5 lines, -7 lines 0 comments Download
M lily/midi-control-function-performer.cc View 3 chunks +3 lines, -5 lines 0 comments Download
M lily/part-combine-iterator.cc View 4 chunks +3 lines, -4 lines 0 comments Download
M lily/scheme-engraver.cc View 1 2 2 chunks +3 lines, -34 lines 0 comments Download
D lily/scheme-listener.cc View 1 2 3 1 chunk +0 lines, -56 lines 0 comments Download
D lily/scheme-listener-scheme.cc View 1 chunk +0 lines, -34 lines 0 comments Download
M lily/score-engraver.cc View 4 chunks +6 lines, -9 lines 0 comments Download
M lily/score-performer.cc View 3 chunks +6 lines, -9 lines 0 comments Download
M lily/smobs.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M lily/translator-group.cc View 1 2 3 3 chunks +2 lines, -3 lines 0 comments Download
M scm/part-combiner.scm View 1 chunk +27 lines, -29 lines 0 comments Download
M scm/scheme-engravers.scm View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 10
benko.pal
looks exciting to me; my only comment is about a comment https://codereview.appspot.com/235790043/diff/1/lily/include/listener.hh File lily/include/listener.hh (right): ...
9 years ago (2015-04-30 18:48:41 UTC) #1
dak
https://codereview.appspot.com/235790043/diff/1/lily/include/listener.hh File lily/include/listener.hh (right): https://codereview.appspot.com/235790043/diff/1/lily/include/listener.hh#newcode27 lily/include/listener.hh:27: register a method as an event handler in a ...
9 years ago (2015-04-30 19:14:37 UTC) #2
dak
Improve comment, cosmetic change
9 years ago (2015-05-01 00:20:06 UTC) #3
Dan Eble
I have reviewed the changes to smob and listener. https://codereview.appspot.com/235790043/diff/1/lily/include/listener.hh File lily/include/listener.hh (left): https://codereview.appspot.com/235790043/diff/1/lily/include/listener.hh#oldcode84 lily/include/listener.hh:84: ...
9 years ago (2015-05-01 00:22:09 UTC) #4
dak
https://codereview.appspot.com/235790043/diff/1/lily/include/listener.hh File lily/include/listener.hh (left): https://codereview.appspot.com/235790043/diff/1/lily/include/listener.hh#oldcode84 lily/include/listener.hh:84: Listener (Listener const &other); On 2015/05/01 00:22:09, Dan Eble ...
9 years ago (2015-05-01 00:44:45 UTC) #5
Dan Eble
On 2015/05/01 00:44:45, dak wrote: > I am not going to put in an explanation ...
9 years ago (2015-05-01 01:22:57 UTC) #6
dak
On 2015/05/01 01:22:57, Dan Eble wrote: > On 2015/05/01 00:44:45, dak wrote: > > I ...
9 years ago (2015-05-01 07:14:15 UTC) #7
dak
Fix naming conflict
9 years ago (2015-05-01 08:16:27 UTC) #8
benko.pal
LGTM
9 years ago (2015-05-01 16:21:48 UTC) #9
dak
9 years ago (2015-05-02 11:17:36 UTC) #10
Rebase on current master.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b