diff options
Diffstat (limited to 'hdr/identifier.hh')
-rw-r--r-- | hdr/identifier.hh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/hdr/identifier.hh b/hdr/identifier.hh new file mode 100644 index 0000000000..9cb80386c0 --- /dev/null +++ b/hdr/identifier.hh @@ -0,0 +1,36 @@ + +/* + identifier.hh -- part of LilyPond + + (c) 1996 Han-Wen Nienhuys +*/ + +#ifndef IDENTIFIER_HH +#define IDENTIFIER_HH +#include "proto.hh" +#include "string.hh" + +struct Identifier +{ + void *data; + String name; + + Identifier(String n) ; + virtual ~Identifier(); + virtual Staff * staff() { assert(false); } + virtual Voice * voice() { assert(false); } +}; + +struct Staff_id : Identifier { + Staff_id(String s, Staff*st):Identifier(s) { data = st; } + virtual Staff* staff() { return (Staff*) data; } + ~Staff_id(); +}; + +struct Voice_id : Identifier { + Voice_id(String s, Voice*st):Identifier(s) { data = st; } + virtual Voice * voice() { return (Voice*)data; } + ~Voice_id(); +}; +#endif // IDENTIFIER_HH + |