lilypond-0.0.35
[lilypond.git] / hdr / identparent.hh
blobda7ab7012cb88ece848d2dbb1c2e64ccbf99ddbf
1 /*
2 identparent.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
5 */
7 #ifndef IDENTPARENT_HH
8 #define IDENTPARENT_HH
10 #include "proto.hh"
11 #include "string.hh"
13 /* boolean argument to accesor is copy_b..*/
14 #define IDACCESSOR( Input_staff, staff)\
15 virtual Input_staff * staff(bool) { error(#Input_staff); return 0; }
17 struct Identifier {
18 void *data;
19 String name;
21 Identifier(String n) : name(n) { }
22 virtual ~Identifier() {}
23 virtual const char*classname() { return "new Identifier"; }
24 void error(String);
25 IDACCESSOR(Input_staff, staff)
26 IDACCESSOR(Input_music, music)
27 IDACCESSOR(Music_voice, mvoice)
28 IDACCESSOR(Script_def, script)
29 IDACCESSOR(Symtables, symtables)
30 IDACCESSOR(Music_general_chord, mchord)
31 IDACCESSOR(Lookup,lookup)
32 IDACCESSOR(Real,real)
33 IDACCESSOR(Notename_tab, notename_tab)
34 private:
35 Identifier(Identifier const&){}
37 #endif // IDENTPARENT_HH