-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUnitBB.pas
70 lines (52 loc) · 1.24 KB
/
UnitBB.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
unit UnitBB;
{$INCLUDE UnitCircularReferencesDef.inc}
interface
uses
{$ifdef UCR_DepsNext} UnitCCC, {$endif UCR_DepsNext}
//
UnitCircularReferences;
type
TInit = class(TUnitCircularReferences)
protected
class function Dependencies: TUCRDepsArr; override;
class procedure DoInitialize; override;
class procedure DoFinalize; override;
end;
{$ifNdef UCR_ONLY}
... all lines after 'interface TInit' and before 'implementation'
{$endif UCR_ONLY}
implementation
uses
//
//
{$ifdef UCR_DepsPrev} UnitA , {$endif UCR_DepsPrev}
//
System.Types; // dummy
{$ifNdef UCR_ONLY}
... all lines after 'implementation uses' and before 'TInit'
{$endif UCR_ONLY}
{ TInit }
class function TInit.Dependencies: TUCRDepsArr;
begin
Result := [
{$ifdef UCR_DepsNext} UnitCCC.TInit, {$endif UCR_DepsNext}
{$ifdef UCR_DepsPrev} UnitA .TInit, {$endif UCR_DepsPrev}
nil]; // dummy
end;
class procedure TInit.DoInitialize;
begin
{$ifNdef UCR_ONLY}
... // Usage hint 2: move your initialization code here.
{$endif UCR_ONLY}
end;
class procedure TInit.DoFinalize;
begin
{$ifNdef UCR_ONLY}
... // Usage hint 2: move your finalization code here.
{$endif UCR_ONLY}
end;
initialization
TInit.Initialize;
finalization
TInit.Finalize;
end.