Erik Sandberg schreef:
On Monday 10 July 2006 13:42, Erik Sandberg wrote:
On 7/10/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> 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 - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

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



_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to