Hosted by
|
package body Parts is
function Create
(Id : in String)
return Part_Access
is
Result : Part_Access := new Part;
begin
To_String_Access(Id, Result.Id);
Result.Measures := Measure_Lists.Create;
return Result;
end Create;
function Get_Id
(This : access Part)
return String is
begin
return To_String(This.Id);
end Get_Id;
procedure Set_Name
(This : access Part;
Name : in String) is
begin
To_String_Access(Name, This.Name);
end Set_Name;
function Get_Name
(This : access Part)
return String is
begin
return To_String(This.Name);
end Get_Name;
procedure Set_Score_Instrument
(This : access Part;
Score_Instrument : in Score_Instrument_Access) is
begin
This.Score_Instrument := Score_Instrument;
end Set_Score_Instrument;
function Get_Score_Instrument
(This : access Part)
return Score_Instrument_Access is
begin
return This.Score_Instrument;
end Get_Score_Instrument;
procedure Set_Midi_Instrument
(This : access Part;
Midi_Instrument : in Midi_Instrument_Access) is
begin
This.Midi_Instrument := Midi_Instrument;
end Set_Midi_Instrument;
function Get_Midi_Instrument
(This : access Part)
return Midi_Instrument_Access is
begin
return This.Midi_Instrument;
end Get_Midi_Instrument;
function Get_Measures
(This : access Part)
return Measure_List_Access is
begin
return This.Measures;
end Get_Measures;
procedure Add_Measure
(This : access Part;
Add : access Measures.Measure) is
begin
Measure_Lists.Push(This.Measures, Measures.Measure_Access(Add));
end Add_Measure;
end Parts;
|