blob: b573429079bf69f090f8d1edb602dadb11d0a908 (
plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
unit tw6989;
{$mode objfpc}{$H+}
{$inline on}
interface
uses
Classes, SysUtils;
const
ltValue = 3;
type
TDebugClass = 0..31;
{ TLogger }
TLogger = class
private
FDefaultClass: TDebugClass;
// FChannels:TChannelList;
procedure SendString(AMsgType: Integer;const AText:String);
public
ActiveClasses: set of TDebugClass;//Made a public field toallow use of include
constructor Create;
destructor Destroy; override;
procedure Clear;
procedure Send(const AText: String); inline;
procedure Send(AClass: TDebugClass; const AText: String);
procedure Send(const AText: String; Args: array of const); inline;
procedure Send(AClass: TDebugClass; const AText: String; Args: array of const);
procedure Send(const AText, AValue: String); inline;
procedure Send(AClass: TDebugClass; const AText,AValue: String);
procedure Send(const AText: String; AValue: Integer); inline;
procedure Send(AClass: TDebugClass; const AText: String; AValue: Integer);
procedure Send(const AText: String; AValue: Boolean); inline;
procedure Send(AClass: TDebugClass; const AText: String; AValue: Boolean);
procedure Send(const AText: String; ARect: TRect); inline;
//if the next inline is commented no error occurs
procedure Send(AClass: TDebugClass; const AText: String; ARect: TRect); inline;
end;
implementation
{ TLogger }
procedure TLogger.SendString(AMsgType: Integer; const AText: String);
begin
end;
constructor TLogger.Create;
begin
end;
destructor TLogger.Destroy;
begin
end;
procedure TLogger.Clear;
begin
end;
procedure TLogger.Send(const AText: String);
begin
end;
procedure TLogger.Send(AClass: TDebugClass; const AText: String);
begin
end;
procedure TLogger.Send(const AText: String; Args: array of const);
begin
end;
procedure TLogger.Send(AClass: TDebugClass; const AText: String;
Args: array of const);
begin
end;
procedure TLogger.Send(const AText, AValue: String);
begin
end;
procedure TLogger.Send(AClass: TDebugClass; const AText, AValue: String);
begin
end;
procedure TLogger.Send(const AText: String; AValue: Integer);
begin
end;
procedure TLogger.Send(AClass: TDebugClass; const AText: String; AValue: Integer);
begin
end;
procedure TLogger.Send(const AText: String; AValue: Boolean);
begin
end;
procedure TLogger.Send(AClass: TDebugClass; const AText: String; AValue: Boolean);
begin
end;
procedure TLogger.Send(const AText: String; ARect: TRect);
begin
end;
procedure TLogger.Send(AClass: TDebugClass; const AText: String; ARect: TRect);
begin
//if this body procedure is commented also no error occurs
if not (AClass in ActiveClasses) then Exit;
with ARect do
SendString(ltValue,Format('%s = (Left: %d; Top: %d; Right: %d; Bottom: %d)',[AText,Left,Top,Right,Bottom]));
end;
end.
|