source: ObjectBaseTypes/Level 1/UObjectByte.pas

Last change on this file was 32, checked in by george, 14 years ago
  • Přidáno: Třída TSubStream pro transparentní mapování podproudu do jiného proudu.
File size: 1.5 KB
Line 
1unit UObjectByte;
2
3interface
4
5uses
6 Classes, SysUtils, UObjectTypeBase, UObjectBoolean;
7
8type
9 TByte = class(TInterfacedObject, IAssignable, IOrderable, IComparable)
10 public
11 Value: Byte;
12 procedure Assign(Source: TInterfacedObject);
13 function HigherThen(Operand: IOrderable): TBoolean;
14 function LowerThan(Operand: IOrderable): TBoolean;
15 function Max(Operand1, Operand2: IOrderable): IOrderable;
16 function Min(Operand1, Operand2: IOrderable): IOrderable;
17 function EqualTo(Operand: IComparable): TBoolean;
18 function Predecessor: IOrderable;
19 function Successor: IOrderable;
20 function Low: IOrderable;
21 function High: IOrderable;
22 end;
23
24implementation
25
26{ TByte }
27
28procedure TByte.Assign(Source: TInterfacedObject);
29begin
30 if Source is TByte then Value := (Source as TByte).Value
31 else raise EConvertError.Create('');
32end;
33
34function TByte.EqualTo(Operand: IComparable): TBoolean;
35begin
36
37end;
38
39function TByte.High: IOrderable;
40begin
41
42end;
43
44function TByte.HigherThen(Operand: IOrderable): TBoolean;
45begin
46
47end;
48
49function TByte.Low: IOrderable;
50begin
51
52end;
53
54function TByte.LowerThan(Operand: IOrderable): TBoolean;
55begin
56
57end;
58
59function TByte.Max(Operand1, Operand2: IOrderable): IOrderable;
60begin
61
62end;
63
64function TByte.Min(Operand1, Operand2: IOrderable): IOrderable;
65begin
66
67end;
68
69function TByte.Predecessor: IOrderable;
70begin
71
72end;
73
74function TByte.Successor: IOrderable;
75begin
76
77end;
78
79end.
Note: See TracBrowser for help on using the repository browser.