-- $Date: 2004/03/08 11:05:10 $
-- $Revision: 1.19 $
-- $Author: jcrocholl $
-- $Hash: 6cc1ba745d4831a883bdd9fdf783b88a $

-- This file was automatically created with ado.php.
-- Manual changes will be lost when it is updated.

with Score_Instruments; use Score_Instruments;
with Midi_Instruments; use Midi_Instruments;
with Lists;
with Measures;

with Strings; use Strings;

package Parts is

   package Measure_Lists is new Lists(Measures.Measure_Access);
   subtype Measure_List is Measure_Lists.List;
   subtype Measure_List_Access is Measure_Lists.List_Access;

   -- Public representation.
   type Part is limited private;

   -- Pointer to representation data.
   type Part_Access is access all Part;

   -- Constructor for instances.
   function Create
     (Id : in String)    -- The initial id.
     return Part_Access-- The newly created part.

   -- Accessor to read the id of a part.
   function Get_Id
     (This : access Part-- The part to read from.
     return String;       -- The id of that part.

   -- Mutator to update the name of a part.
   procedure Set_Name
     (This : access Part-- The part to be updated.
      Name : in String);  -- The new name of that part.

   -- Accessor to read the name of a part.
   function Get_Name
     (This : access Part-- The part to read from.
     return String;       -- The name of that part.

   -- Mutator to update the score instrument of a part.
   procedure Set_Score_Instrument
     (This             : access Part;                 -- The part to be updated.
      Score_Instrument : in Score_Instrument_Access); -- The new score instrument of that part.

   -- Accessor to read the score instrument of a part.
   function Get_Score_Instrument
     (This : access Part)            -- The part to read from.
     return Score_Instrument_Access-- The score instrument of that part.

   -- Mutator to update the midi instrument of a part.
   procedure Set_Midi_Instrument
     (This            : access Part;                -- The part to be updated.
      Midi_Instrument : in Midi_Instrument_Access); -- The new midi instrument of that part.

   -- Accessor to read the midi instrument of a part.
   function Get_Midi_Instrument
     (This : access Part)           -- The part to read from.
     return Midi_Instrument_Access-- The midi instrument of that part.

   -- Accessor to read the measures of a part.
   function Get_Measures
     (This : access Part)        -- The part to read from.
     return Measure_List_Access-- The measures of that part.

   -- Add a measure to the end of the part.
   procedure Add_Measure
     (This : access Part;              -- The part object instance.
      Add  : access Measures.Measure); -- The measure to be added.

private

   -- Private representation.
   type Part is limited record
      Id               : String_Access;
      Name             : String_Access;
      Score_Instrument : Score_Instrument_Access;
      Midi_Instrument  : Midi_Instrument_Access;
      Measures         : Measure_List_Access;
   end record;

end Parts;