]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/identparent.hh
release: 0.0.39-1
[lilypond.git] / lily / include / identparent.hh
1 /*
2   identparent.hh -- part of LilyPond
3
4   (c) 1996,97 Han-Wen Nienhuys
5 */
6
7 #ifndef IDENTPARENT_HH
8 #define IDENTPARENT_HH
9
10 #include "proto.hh"
11 #include "string.hh"
12
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; }
16
17 struct Identifier {
18     void *data;
19     String name;
20     
21     Identifier(String n) : name(n) { }
22     virtual ~Identifier() {}
23
24     void print()const;
25     virtual const char*classname() { return "new Identifier"; }
26     void error(String);
27     IDACCESSOR(Input_staff, staff)
28     IDACCESSOR(Input_music, music)
29     IDACCESSOR(Music_voice, mvoice)
30     IDACCESSOR(Script_def, script)      
31     IDACCESSOR(Symtables, symtables)
32     IDACCESSOR(Music_general_chord, mchord)
33     IDACCESSOR(Lookup,lookup)
34     IDACCESSOR(Real,real)
35     IDACCESSOR(Notename_tab, notename_tab)
36 protected:
37     virtual void do_print()const=0;
38 private:
39     Identifier(Identifier const&){}
40     
41 };
42 #endif // IDENTPARENT_HH
43
44
45