-- $Date: 2004/01/28 05:01:41 $
-- $Revision: 1.2 $
-- $Author: jcrocholl $

with Words.MusicXML; use Words.MusicXML;

package body Dir_Types.MusicXML is

   -- Read direction type data from an XML reader.
   function Read_Dir_Type
     (XML : access XML_Reader-- Use this XML reader.
     return Dir_Type_Access    -- The newly created direction type.
   is
      Result : Dir_Type_Access := Create;
   begin
      Exit_Tag(XML);
      Set_Words(Result, Read_Words(XML));
      return Result;
   end Read_Dir_Type;

   -- Write direction type data to an XML writer.
   procedure Write_Dir_Type
     (XML  : access XML_Writer-- Use this XML writer.
      This : access Dir_Type)   -- Write this direction type.
   is
   begin
      Start_Element(XML, "direction-type");
      Write_Words(XML, Get_Words(This));
      Close_Element(XML, "direction-type");
   end Write_Dir_Type;

end Dir_Types.MusicXML;