Hosted by
|
with Integer_Strings; use Integer_Strings;
package body Times.MusicXML is
function Read_Beats
(XML : access XML_Reader;
Symbol : in Symbol_Enum)
return Time_Access
is
Beats : Positive;
Beat_Type : Positive;
begin
Beats := To_Number(Read_Data(XML));
Exit_Element(XML);
Assert_Tag(XML, "beat-type");
Beat_Type := To_Number(Read_Data(XML));
Exit_Element(XML);
return Create(Symbol, Beats, Beat_Type, False);
end Read_Beats;
procedure Write_Beats
(XML : access XML_Writer;
This : access Time)
is
begin
Write_Element(XML, "beats", To_String(Get_Beats(This)));
Write_Element(XML, "beat-type", To_String(Get_Beat_Type(This)));
end Write_Beats;
end Times.MusicXML;
|