-- $Date: 2004/03/08 10:47:09 $
-- $Revision: 1.5 $
-- $Author: jcrocholl $

with Messages; use Messages;
with Integer_Strings; use Integer_Strings;
with Music.Output; use Music.Output;

package body Measures.Output is

   procedure Add
     (To   : access Collector'Class;
      This : access Measure)
   is
      use Clef_Lists;
      Clefs : Clef_List_Access;
      use Time_Lists;
      Times : Time_List_Access;
      use Music_Lists;
      Musics : Music_List_Access;
   begin
      Add_Measure(To);

      Clefs := Get_Clefs(This);
      Reset(Clefs);
      while Next(Clefs) loop
         Add_Clef(To, Current(Clefs));
      end loop;

      if This.Key /= null then
         Add_Key(To, This.Key);
      end if;

      Times := Get_Times(This);
      Reset(Times);
      while Next(Times) loop
         Add_Time(To, Current(Times));
      end loop;

      Musics := Get_Musics(This);
      Reset(Musics);
      while Next(Musics) loop
         Add(To, Current(Musics));
      end loop;
   end Add;

end Measures.Output;