lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating translators


From: Han-Wen Nienhuys
Subject: Re: Updating translators
Date: Wed, 12 Jul 2006 13:59:07 +0200
User-agent: Thunderbird 1.5.0.4 (X11/20060614)

Erik Sandberg schreef:
On Monday 10 July 2006 13:42, Erik Sandberg wrote:
On 7/10/06, Han-Wen Nienhuys <address@hidden> wrote:
Erik Sandberg schreef:
Use C++ names in C++, and scheme names in scheme, i.e.

   Foo_bar::bla_bla

for handling a bla-bla-event.
so do you also think that all stream-event classes should be named
like 'arpeggio-event' rather than 'ArpeggioEvent'?

Regarding bla_bla for classes, it makes me nervous about namespace
clashes. Why not use Foo_bar::bla_bla_event?
maybe

   Foo_bar::listen_bla_bla
ok, fair enough.

Attached is an updated version. Notes:
- The Scheme symbol for arpeggio events is arpeggio-event. This naming convention is different from previous event classes. We can make it more consistent later, when we have agreed on good naming conventions. - The code that converts music name to event-class (ArpeggioEvent->arpeggio-event) is unclean and too C-ish. I'll fix that when the translator cleanup is finished and a better music->event conversion interface will be designed.

Ok.

Looks good, I think.

+/*
+ Implement the method cl::listen_##m, and make it listen to stream + events of class m.
+ */
+#define IMPLEMENT_TRANSLATOR_LISTENER(cl, m)           \
+static class cl ## _ ## m ## _init                     \
+{                                                      \
+public:                                                        \
+  cl ## _ ## m ## _init ()                             \
+  {                                                    \
+    cl::_internal_declare_ ## m ();                    \
+  }                                                    \
+} cl ## _ ## m ## _dummy;                              \

why don't you use ADD_SCM_INIT_FUNCTION ?

--

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]