[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S)
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T. |
Date: |
Wed, 13 May 2015 00:36:18 +0000 |
Updates:
Labels: -Patch-needs_work Patch-new
Comment #11 on issue 4365 by address@hidden: Patch: Add
ly_is_smob<T>(S) to check if S is a smob of type T.
https://code.google.com/p/lilypond/issues/detail?id=4365#c11
Issue 4365: non-member is_smob<>(), is_derived_smob<>(), etc.
Hide Smob_base<>::is_smob() to prevent the misleading situation of
D::is_smob(S) returning true when S represents an ancestor of D rather
than a D. This issue was previously worked around by overriding
is_smob in several derived smob classes; that is no longer needed.
For derived smobs, is_derived_smob<>() is required and incorporates a
dynamic cast. The same distinction applies to unsmob<>() and
derived_unsmob<>().
Smob_base<>::smob_p() is hidden because there doesn't seem to be a
need for it to be public.
Files in lily/include were edited by hand. Files in lily itself were
processed with the following sed script.
s/\(Engraver\|Global_context\|Item\|Music\|Paper_score\|Performance\|
Performer\|Spanner\|Stream_event\)::is_smob/is_derived_smob<\1>/g
s/\(Engraver\|Global_context\|Item\|Music\|Paper_score\|Performance\|
Performer\|Spanner\|Stream_event\)::unsmob/derived_unsmob<\1>/g
s/LY_ASSERT_SMOB (\(Engraver\|Global_context\|Item\|Music\|Paper_score\|
Performance\|Performer\|Spanner\|Stream_event\),/LY_ASSERT_DERIVED_SMOB
(\1,/g
s/\([A-Za-z_]\+\)::is_smob/is_smob<\1>/g
s/\([A-Za-z_]\+\)::unsmob/unsmob<\1>/g
s/Input \*\([A-Za-z_]\+\) = unsmob /Input *\1 = unsmob<Input> /g
http://codereview.appspot.com/231680043
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., (continued)
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/01
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/02
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/02
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/06
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/06
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/07
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/07
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/08
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/08
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/08
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T.,
lilypond <=