Hosted by
|
with Ada.Tags; use Ada.Tags;
with Messages; use Messages;
with Tag_Strings; use Tag_Strings;
with Music.Notes.Output; use Music.Notes.Output; use Music.Notes;
with Music.Barlines.Output; use Music.Barlines.Output; use Music.Barlines;
package body Music.Output is
procedure Add
(To : access Collector'Class;
This : access Music_Data'Class)
is
use type Ada.Tags.Tag;
Tag : String := To_String(This.all'Tag);
begin
if Tag = Note_Tag then Music.Notes.Output.Add(To, Note_Access(This));
elsif Tag = Barline_Tag then Music.Barlines.Output.Add(To, Barline_Access(This));
else
Error("unsupported element: " & Tag);
end if;
end Add;
end Music.Output;
|