source: trunk/Compiler/Modules/DynamicC/ModuleDynamicC.pas

Last change on this file was 77, checked in by chronos, 6 months ago
  • Modified: Compiler targets moved into modules.
File size: 957 bytes
Line 
1unit ModuleDynamicC;
2
3interface
4
5uses
6 Classes, SysUtils, ModularSystem, TargetDynamicC, CompilerAPI;
7
8type
9
10 { TModuleDynamicC }
11
12 TModuleDynamicC = class(TModule)
13 public
14 Target: TTargetDynamicC;
15 constructor Create(AOwner: TComponent); override;
16 destructor Destroy; override;
17 procedure DoInstall; override;
18 procedure DoUninstall; override;
19 end;
20
21
22implementation
23
24resourcestring
25 SDynamicC = 'Dynamic C';
26
27{ TModuleDynamicC }
28
29constructor TModuleDynamicC.Create;
30begin
31 inherited;
32 Identification := 'DynamicC';
33 Title := SDynamicC;
34end;
35
36destructor TModuleDynamicC.Destroy;
37begin
38 inherited;
39end;
40
41procedure TModuleDynamicC.DoInstall;
42begin
43 Target := TTargetDynamicC.Create;
44 with TCompilerAPI(API) do begin
45 RegisterTarget(TTargetDynamicC);
46 end;
47 inherited;
48end;
49
50procedure TModuleDynamicC.DoUninstall;
51begin
52 with TCompilerAPI(API) do begin
53 UnregisterTarget(TTargetDynamicC);
54 end;
55 inherited;
56end;
57
58end.
59
Note: See TracBrowser for help on using the repository browser.