Line | |
---|
1 | {$IFDEF INTERFACE}
|
---|
2 |
|
---|
3 | TGTreeNode = class;
|
---|
4 |
|
---|
5 | {$DEFINE TGListIndex := TGTreeIndex}
|
---|
6 | {$DEFINE TGListItem := TGTreeNode}
|
---|
7 | {$DEFINE TGList := TGTreeNodeList}
|
---|
8 | {$DEFINE INTERFACE}
|
---|
9 | {$I 'GenericList.inc'}
|
---|
10 |
|
---|
11 | // TGTreeNode<TGTreeIndex, TGTreeItem> = class
|
---|
12 | TGTreeNode = class
|
---|
13 | Childs: TGTreeNodeList;
|
---|
14 | Value: TGTreeItem;
|
---|
15 | procedure Clear;
|
---|
16 | end;
|
---|
17 |
|
---|
18 | // TGTree<TGTreeIndex, TGTreeItem> = class
|
---|
19 | TGTree = class
|
---|
20 | TopItem: TGTreeNode;
|
---|
21 | procedure Clear;
|
---|
22 | end;
|
---|
23 |
|
---|
24 | {$UNDEF INTERFACE}
|
---|
25 | {$ENDIF}
|
---|
26 |
|
---|
27 | {$IFDEF IMPLEMENTATION_USES}
|
---|
28 |
|
---|
29 | {$DEFINE IMPLEMENTATION_USES}
|
---|
30 | {$I 'GenericList.inc'}
|
---|
31 |
|
---|
32 | {$UNDEF INTERFACE_USES}
|
---|
33 | {$ENDIF}
|
---|
34 |
|
---|
35 |
|
---|
36 | {$IFDEF IMPLEMENTATION}
|
---|
37 | {$UNDEF IMPLEMENTATION}
|
---|
38 |
|
---|
39 | {$DEFINE TGListIndex := TGTreeIndex}
|
---|
40 | {$DEFINE TGListItem := TGTreeNode}
|
---|
41 | {$DEFINE TGList := TGTreeNodeList}
|
---|
42 | {$DEFINE IMPLEMENTATION}
|
---|
43 | {$I 'GenericList.inc'}
|
---|
44 |
|
---|
45 | { TGTreeNode }
|
---|
46 |
|
---|
47 | procedure TGTreeNode.Clear;
|
---|
48 | begin
|
---|
49 | Childs.Clear;
|
---|
50 | end;
|
---|
51 |
|
---|
52 | { TGTree }
|
---|
53 |
|
---|
54 | procedure TGTree.Clear;
|
---|
55 | begin
|
---|
56 | if Assigned(TopItem) then TopItem.Clear;
|
---|
57 | end;
|
---|
58 |
|
---|
59 | {$UNDEF IMPLEMENTATION}
|
---|
60 | {$ENDIF}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.