source: trunk/Modules/Attendance/UAccessControler.pas

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 
1unit UAccessControler;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, UAttendance, UCommPin;
9
10type
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
30implementation
31
32{ TAccessControler }
33
34procedure TAccessControler.SetActive(AValue: Boolean);
35begin
36 if FActive = AValue then Exit;
37 FActive := AValue;
38end;
39
40constructor TAccessControler.Create;
41begin
42 Pin := TCommPin.Create;
43 Id := 1;
44end;
45
46destructor TAccessControler.Destroy;
47begin
48 FreeAndNil(Pin);
49 inherited Destroy;
50end;
51
52function TAccessControler.GetUser(Id: Integer; User: TUser): Boolean;
53begin
54
55end;
56
57function TAccessControler.GetUserCount: Integer;
58begin
59
60end;
61
62function TAccessControler.GetPassage(Id: Integer; Passage: TUserPassage): Boolean;
63begin
64
65end;
66
67function TAccessControler.GetPassageCount: Integer;
68begin
69
70end;
71
72end.
73
Note: See TracBrowser for help on using the repository browser.