Last change
on this file was 24, checked in by chronos, 12 years ago |
- Opraveno: Ladění komunikačního protokolu s terminálem BF-630.
|
File size:
1.3 KB
|
Line | |
---|
1 | unit UAccessControler;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, UAttendance, UCommPin;
|
---|
9 |
|
---|
10 | type
|
---|
11 | { TAccessControler }
|
---|
12 |
|
---|
13 | TAccessControler = class
|
---|
14 | private
|
---|
15 | FActive: Boolean;
|
---|
16 | protected
|
---|
17 | procedure SetActive(AValue: Boolean); virtual;
|
---|
18 | public
|
---|
19 | Id: Integer;
|
---|
20 | Pin: TCommPin;
|
---|
21 | constructor Create; virtual;
|
---|
22 | destructor Destroy; override;
|
---|
23 | function GetUser(Id: Integer; User: TUser): Boolean; virtual;
|
---|
24 | function GetUserCount: Integer; virtual;
|
---|
25 | function GetPassage(Id: Integer; Passage: TUserPassage): Boolean; virtual;
|
---|
26 | function GetPassageCount: Integer; virtual;
|
---|
27 | property Active: Boolean read FActive write SetActive;
|
---|
28 | end;
|
---|
29 |
|
---|
30 | implementation
|
---|
31 |
|
---|
32 | { TAccessControler }
|
---|
33 |
|
---|
34 | procedure TAccessControler.SetActive(AValue: Boolean);
|
---|
35 | begin
|
---|
36 | if FActive = AValue then Exit;
|
---|
37 | FActive := AValue;
|
---|
38 | end;
|
---|
39 |
|
---|
40 | constructor TAccessControler.Create;
|
---|
41 | begin
|
---|
42 | Pin := TCommPin.Create;
|
---|
43 | Id := 1;
|
---|
44 | end;
|
---|
45 |
|
---|
46 | destructor TAccessControler.Destroy;
|
---|
47 | begin
|
---|
48 | FreeAndNil(Pin);
|
---|
49 | inherited Destroy;
|
---|
50 | end;
|
---|
51 |
|
---|
52 | function TAccessControler.GetUser(Id: Integer; User: TUser): Boolean;
|
---|
53 | begin
|
---|
54 |
|
---|
55 | end;
|
---|
56 |
|
---|
57 | function TAccessControler.GetUserCount: Integer;
|
---|
58 | begin
|
---|
59 |
|
---|
60 | end;
|
---|
61 |
|
---|
62 | function TAccessControler.GetPassage(Id: Integer; Passage: TUserPassage): Boolean;
|
---|
63 | begin
|
---|
64 |
|
---|
65 | end;
|
---|
66 |
|
---|
67 | function TAccessControler.GetPassageCount: Integer;
|
---|
68 | begin
|
---|
69 |
|
---|
70 | end;
|
---|
71 |
|
---|
72 | end.
|
---|
73 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.