source: trunk/Packages/TemplateGenerics/Specialized/SpecializedTree.pas

Last change on this file was 29, checked in by chronos, 12 years ago
  • Modified: Packages stored as uncompressed files.
File size: 3.1 KB
Line 
1unit SpecializedTree;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils;
9
10type
11{$MACRO ON}
12// TTreeInteger<Integer, Integer>
13{$DEFINE TGTreeIndex := Integer}
14{$DEFINE TGTreeItem := Integer}
15{$DEFINE TGTree := TTreeInteger}
16{$DEFINE TGTreeNode := TTreeNodeInteger}
17{$DEFINE TGTreeNodeList := TTreeNodeListInteger}
18{$DEFINE TGTreeSortCompare := TTreeSortCompareInteger}
19{$DEFINE TGTreeToStringConverter := TTreeToStringConverterInteger}
20{$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterInteger}
21{$DEFINE TGTreeItemArray := TTreeIntegerItemArray}
22{$DEFINE INTERFACE}
23{$I 'GenericTree.inc'}
24
25// TTreeString<Integer, string>
26{$DEFINE TGTreeIndex := Integer}
27{$DEFINE TGTreeItem := string}
28{$DEFINE TGTree := TTreeString}
29{$DEFINE TGTreeNode := TTreeNodeString}
30{$DEFINE TGTreeNodeList := TTreeNodeListString}
31{$DEFINE TGTreeSortCompare := TTreeSortCompareString}
32{$DEFINE TGTreeToStringConverter := TTreeToStringConverterString}
33{$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterString}
34{$DEFINE TGTreeItemArray := TTreeStringItemArray}
35{$DEFINE INTERFACE}
36{$I 'GenericTree.inc'}
37
38// TTreePointer<Integer, Pointer>
39{$DEFINE TGTreeIndex := Integer}
40{$DEFINE TGTreeItem := Pointer}
41{$DEFINE TGTree := TTreePointer}
42{$DEFINE TGTreeNode := TTreeNodePointer}
43{$DEFINE TGTreeNodeList := TTreeNodeListPointer}
44{$DEFINE TGTreeSortCompare := TTreeSortComparePointer}
45{$DEFINE TGTreeToStringConverter := TTreeToStringConverterPointer}
46{$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterPointer}
47{$DEFINE TGTreeItemArray := TTreePointerItemArray}
48{$DEFINE INTERFACE}
49{$I 'GenericTree.inc'}
50
51implementation
52
53{$DEFINE IMPLEMENTATION_USES}
54{$I 'GenericTree.inc'}
55
56// TTreeInteger<Integer, Integer>
57{$DEFINE TGTreeIndex := Integer}
58{$DEFINE TGTreeItem := Integer}
59{$DEFINE TGTree := TTreeInteger}
60{$DEFINE TGTreeNode := TTreeNodeInteger}
61{$DEFINE TGTreeNodeList := TTreeNodeListInteger}
62{$DEFINE TGTreeSortCompare := TTreeSortCompareInteger}
63{$DEFINE TGTreeToStringConverter := TTreeToStringConverterInteger}
64{$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterInteger}
65{$DEFINE TGTreeItemArray := TTreeIntegerItemArray}
66{$DEFINE IMPLEMENTATION}
67{$I 'GenericTree.inc'}
68
69// TTreeString<Integer, string>
70{$DEFINE TGTreeIndex := Integer}
71{$DEFINE TGTreeItem := string}
72{$DEFINE TGTree := TTreeString}
73{$DEFINE TGTreeNode := TTreeNodeString}
74{$DEFINE TGTreeNodeList := TTreeNodeListString}
75{$DEFINE TGTreeSortCompare := TTreeSortCompareString}
76{$DEFINE TGTreeToStringConverter := TTreeToStringConverterString}
77{$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterString}
78{$DEFINE TGTreeItemArray := TTreeStringItemArray}
79{$DEFINE IMPLEMENTATION}
80{$I 'GenericTree.inc'}
81
82// TTreePointer<Integer, Pointer>
83{$DEFINE TGTreeIndex := Integer}
84{$DEFINE TGTreeItem := Pointer}
85{$DEFINE TGTree := TTreePointer}
86{$DEFINE TGTreeNode := TTreeNodePointer}
87{$DEFINE TGTreeNodeList := TTreeNodeListPointer}
88{$DEFINE TGTreeSortCompare := TTreeSortComparePointer}
89{$DEFINE TGTreeToStringConverter := TTreeToStringConverterPointer}
90{$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterPointer}
91{$DEFINE TGTreeItemArray := TTreePointerItemArray}
92{$DEFINE IMPLEMENTATION}
93{$I 'GenericTree.inc'}
94
95end.
Note: See TracBrowser for help on using the repository browser.