Last change
on this file was 238, checked in by chronos, 16 months ago |
- Modified: Removed U prefix from unit names.
- Fixed: Memory leaks.
|
File size:
895 bytes
|
Line | |
---|
1 | unit Project;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, Generics.Collections;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TProjectItem = class
|
---|
10 | Name: string;
|
---|
11 | end;
|
---|
12 |
|
---|
13 | TProjectItems = class(TObjectList<TProjectItem>)
|
---|
14 |
|
---|
15 | end;
|
---|
16 |
|
---|
17 | TProjectFile = class
|
---|
18 | Content: string;
|
---|
19 | end;
|
---|
20 |
|
---|
21 | { TProjectFolder }
|
---|
22 |
|
---|
23 | TProjectFolder = class
|
---|
24 | Items: TProjectItems;
|
---|
25 | constructor Create;
|
---|
26 | destructor Destroy; override;
|
---|
27 | end;
|
---|
28 |
|
---|
29 | { TProject }
|
---|
30 |
|
---|
31 | TProject = class
|
---|
32 | FileName: string;
|
---|
33 | Items: TProjectItems;
|
---|
34 | constructor Create;
|
---|
35 | destructor Destroy; override;
|
---|
36 | end;
|
---|
37 |
|
---|
38 | implementation
|
---|
39 |
|
---|
40 | { TProjectFolder }
|
---|
41 |
|
---|
42 | constructor TProjectFolder.Create;
|
---|
43 | begin
|
---|
44 | Items := TProjectItems.Create;
|
---|
45 | end;
|
---|
46 |
|
---|
47 | destructor TProjectFolder.Destroy;
|
---|
48 | begin
|
---|
49 | FreeAndNil(Items);
|
---|
50 | inherited;
|
---|
51 | end;
|
---|
52 |
|
---|
53 | { TProject }
|
---|
54 |
|
---|
55 | constructor TProject.Create;
|
---|
56 | begin
|
---|
57 | Items := TProjectItems.Create;
|
---|
58 | end;
|
---|
59 |
|
---|
60 | destructor TProject.Destroy;
|
---|
61 | begin
|
---|
62 | FreeAndNil(Items);
|
---|
63 | inherited;
|
---|
64 | end;
|
---|
65 |
|
---|
66 | end.
|
---|
67 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.