Changeset 70 for trunk/Compiler/UAnalyzer.pas
- Timestamp:
- Jul 31, 2012, 4:06:07 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/UAnalyzer.pas
r68 r70 83 83 end; 84 84 85 // TListAnalyzer = TGObjectList<Integer, TAnalyzer> 85 { TListAnalyzer } 86 86 87 TListAnalyzer = class(TListObject) 88 function SearchBySysName(Name: string): TAnalyzer; 89 procedure LoadToStrings(Strings: TStrings); 87 90 end; 88 91 … … 91 94 92 95 implementation 96 97 { TListAnalyzer } 98 99 function TListAnalyzer.SearchBySysName(Name: string): TAnalyzer; 100 var 101 I: Integer; 102 begin 103 I := 0; 104 while (I < Count) and (TAnalyzer(Items[I]).SysName <> Name) do Inc(I); 105 if I < Count then Result := TAnalyzer(Items[I]) 106 else Result := nil; 107 end; 108 109 procedure TListAnalyzer.LoadToStrings(Strings: TStrings); 110 var 111 I: Integer; 112 begin 113 try 114 Strings.BeginUpdate; 115 Strings.Clear; 116 for I := 0 to Count - 1 do 117 Strings.AddObject(TAnalyzer(Items[I]).Name, Items[I]); 118 finally 119 Strings.EndUpdate; 120 end; 121 end; 93 122 94 123 { TAnalyzer }
Note:
See TracChangeset
for help on using the changeset viewer.