[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Member-function callbacks (was Tie: add some C++ rigor and concision)
From: |
Dan Eble |
Subject: |
Member-function callbacks (was Tie: add some C++ rigor and concision) |
Date: |
Wed, 19 Aug 2015 18:53:24 -0400 |
On Jul 23, 2015, at 00:55 , David Kastrup <address@hidden> wrote:
> Dan Eble <address@hidden> writes:
>> One thing that is obviously incomplete is that the final classes are
>> not derived from Grob.
For example, after I run the script you provided, there is this:
class Accidental_interface
{
public:
DECLARE_MEMBER_CALLBACK (print, ());
DECLARE_MEMBER_CALLBACK (horizontal_skylines, ());
// etc.
This can not work as written because the implicit argument is a kind of Grob,
which can not be cast to an Accidental_interface.
> match (I think the next step I was planning on is figuring out per
> script which stuff was derived from the right classes for doing this
> kind of change).
I see these options:
1. Take an entirely different approach to organizing the interfaces, after
careful thought as suggested in
https://code.google.com/p/lilypond/issues/detail?id=4564#c7
2. Derive interface classes from Grob (in some cases a subclass of Grob might
be appropriate) and abuse the pointers, which is where I thought you were going
with this at first.
3. Restrict member callbacks to the handful of subclasses of Grob that exist
now.
Anything else?
—
Dan
- Member-function callbacks (was Tie: add some C++ rigor and concision),
Dan Eble <=