ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/FileClasses/_Extensions.pas
(Generate patch)

Comparing oup/current/FileClasses/_Extensions.pas (file contents):
Revision 228 by alloc, Wed Jun 20 09:51:38 2007 UTC vs.
Revision 231 by alloc, Wed Jun 20 22:24:04 2007 UTC

# Line 2 | Line 2 | unit _Extensions;
2  
3   interface
4  
5 + uses
6 +  _FileTypes;
7 +
8   type
9    TExtension = class
10      private
11        FConnectionID: Integer;
12 +      FExt: String;
13        FFiles: array of Integer;
14        function GetFile(ID: Integer): Integer;
15        function GetFileCount: Integer;
16      public
17        constructor Create(ConnectionID: Integer; Ext: String); virtual;
18        procedure InitList;
19 +      property Ext: String read FExt;
20        property Files[ID: Integer]: Integer read GetFile;
21        property FileCount: Integer read GetFileCount;
22    end;
23  
24 +  TExtensions = array of TExtension;
25 +                      
26 +
27  
28   implementation
29  
# Line 25 | Line 33 | uses
33   { TExtension }
34  
35   constructor TExtension.Create(ConnectionID: Integer; Ext: String);
36 + begin
37 +  FConnectionID := ConnectionID;
38 +  FExt := Ext;
39 + end;
40 +
41 + function TExtension.GetFile(ID: Integer): Integer;
42 + begin
43 +  Result := FFiles[ID];
44 + end;
45 +
46 + function TExtension.GetFileCount: Integer;
47 + begin
48 +  Result := Length(FFiles);
49 + end;
50 +
51 + procedure TExtension.InitList;
52   var
53    files: TStrings;
54    i: Integer;
# Line 49 | Line 73 | begin
73    files.Free;
74   end;
75  
52 function TExtension.GetFile(ID: Integer): Integer;
53 begin
54  Result := FFiles[ID];
55 end;
56
57 function TExtension.GetFileCount: Integer;
58 begin
59  Result := Length(FFiles);
60 end;
61
62 procedure TExtension.InitList;
63 begin
64 Exit;
65 end;
66
76   end.

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)