]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.45
authorfred <fred>
Sun, 24 Mar 2002 19:36:38 +0000 (19:36 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:36:38 +0000 (19:36 +0000)
lily/include/class-name.hh

index 643959d620b17bb69cfc7747b0b32532480bcff4..14ebf4c927435096e0e5265a51b1070ff0d6d48c 100644 (file)
 #ifndef CLASS_NAME_HH
 #define CLASS_NAME_HH
 
-/// a macro to declare the classes name as a static and virtual function.
+/** a macro to declare the classes name as a static and virtual function.
+  The static_name() can *not* be inlined (this might have the effect that 
+  s->name() != S::static_name(). Overlapping strings need not be merged in C++
+ */
 #define NAME_MEMBERS(c)        \
-static char const *static_name(){ return #c; }\
+static char const *static_name();\
 virtual char const *name() const{ return c::static_name(); } \
 int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out()
+
+#define IMPLEMENT_STATIC_NAME(c)\
+    char const *c::static_name() { return #c; } 
     
 #endif // CLASS-NAME_HH