Курсовая работа: Моделирование систем
FElements.Free;
ClearEventQueue;
FEventQueue.Free;
ClearParcelList;
FParcels.Free;
inherited;
end;
function TQSheme.GetElement(Index : integer): TElement;
begin
Result := FElements[Index];
end;
function TQSheme.GetElementCount: integer;
begin
Result := FElements.Count
end;
procedure TQSheme.AddElement(Element: TElement);
begin
if Assigned(Element) then begin
FElements.Add(Element);
Element.Sheme := Self;
end;
end;
procedure TQSheme.DelElement(Element: TElement);
var i,j : integer;
begin
if Assigned(Element) then begin
for i := 0 to ElementCount - 1 do
for j:= Elements[i].SourceCount-1 downto 0 do
if Elements[i].Sources[j] = Element then