Line | |
---|
1 | ' Classes/System/Drawing/CharacterRange.ab
|
---|
2 |
|
---|
3 | #ifndef __SYSTEM_DRAWING_CHARACTERRANGE_AB__
|
---|
4 | #define __SYSTEM_DRAWING_CHARACTERRANGE_AB__
|
---|
5 |
|
---|
6 | Class CharacterRange
|
---|
7 | Public
|
---|
8 | Sub CharacterRange(f As Long, l As Long)
|
---|
9 | first = f
|
---|
10 | length = l
|
---|
11 | End Sub
|
---|
12 |
|
---|
13 | Sub CharacterRange(ByRef c As CharacterRange)
|
---|
14 | first = c.first
|
---|
15 | length = c.length
|
---|
16 | End Sub
|
---|
17 |
|
---|
18 | Sub CharacterRange()
|
---|
19 | First = 0
|
---|
20 | Length = 0
|
---|
21 | End Sub
|
---|
22 |
|
---|
23 | Function First() As Long
|
---|
24 | Return first
|
---|
25 | End Function
|
---|
26 |
|
---|
27 | Sub First(f As Long)
|
---|
28 | first = f
|
---|
29 | End Sub
|
---|
30 |
|
---|
31 | Function Length() As Long
|
---|
32 | Return l
|
---|
33 | End Function
|
---|
34 |
|
---|
35 | Sub Length(l As Long)
|
---|
36 | length = l
|
---|
37 | End Sub
|
---|
38 |
|
---|
39 | Sub Operator = (ByRef c As CharacterRange)
|
---|
40 | first = c.first
|
---|
41 | length = c.length
|
---|
42 | End Sub
|
---|
43 |
|
---|
44 | Function Operator ==(c As CharacterRange)
|
---|
45 | Return Equals(c)
|
---|
46 | End Function
|
---|
47 |
|
---|
48 | Function Operator <>(c As CharacterRange)
|
---|
49 | Return Not Equals(c)
|
---|
50 | End Function
|
---|
51 |
|
---|
52 | Function Equals(c As CharacterRange)
|
---|
53 | Return first = c.first And length = c.length
|
---|
54 | End Function
|
---|
55 |
|
---|
56 | Override Function GetHashCode() As Long
|
---|
57 | Return first Xor length
|
---|
58 | End Function
|
---|
59 |
|
---|
60 | Private
|
---|
61 | first As Long
|
---|
62 | length As Long
|
---|
63 | End Class
|
---|
64 |
|
---|
65 | #endif '__SYSTEM_DRAWING_CHARACTERRANGE_AB__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.