]> git.donarmstrong.com Git - lilypond.git/blob - hdr/identparent.hh
653158da4d90d43f717b0e50bb43ab056746ceb2
[lilypond.git] / hdr / identparent.hh
1 /*
2   identparent.hh -- part of LilyPond
3
4   (c) 1996 Han-Wen Nienhuys
5 */
6
7 #ifndef IDENTPARENT_HH
8 #define IDENTPARENT_HH
9
10 #include "proto.hh"
11 #include "string.hh"
12 #define IDACCESSOR( Input_staff, staff)\
13     virtual Input_staff * staff(bool = false) { error(#Input_staff); return 0; }
14
15 struct Identifier {
16     void *data;
17     String name;
18     
19     Identifier(String n) : name(n) { }
20     virtual ~Identifier() {}
21     virtual const char*classname() { return "new Identifier"; }
22     void error(String);
23     IDACCESSOR(Input_staff, staff)
24     IDACCESSOR(Input_music, music)
25     IDACCESSOR(Music_voice, mvoice)
26     IDACCESSOR(Script_def, script)      
27     IDACCESSOR(Symtables, symtables)
28     IDACCESSOR(Music_general_chord, mchord)
29     IDACCESSOR(Lookup,lookup)
30     IDACCESSOR(Notename_tab, notename_tab)
31 };
32 #endif // IDENTPARENT_HH
33
34
35