Line | |
---|
1 | Class EnumBase
|
---|
2 | Protected
|
---|
3 | m_Value As Long
|
---|
4 | Public
|
---|
5 | Sub EnumBase(value As Long)
|
---|
6 | m_Value=value
|
---|
7 | End Sub
|
---|
8 | Sub ~EnumBase()
|
---|
9 | End Sub
|
---|
10 |
|
---|
11 | 'Abstract Function ToString() As String
|
---|
12 |
|
---|
13 | Sub Copy(ByRef obj As EnumBase)
|
---|
14 | m_Value=obj.m_Value
|
---|
15 | End Sub
|
---|
16 |
|
---|
17 | Sub Operator = (ByRef value As EnumBase) As EnumBase
|
---|
18 | m_Value = value.m_Value
|
---|
19 | End Sub
|
---|
20 |
|
---|
21 | Function Operator() As Long
|
---|
22 | Return m_Value
|
---|
23 | End Function
|
---|
24 |
|
---|
25 | Function Operator == (Value As Long) As Long
|
---|
26 | If m_Value = Value Then
|
---|
27 | Return _System_TRUE
|
---|
28 | Else
|
---|
29 | Return _System_FALSE
|
---|
30 | End If
|
---|
31 | End Function
|
---|
32 |
|
---|
33 | Function Operator or (ByRef value As EnumBase) As EnumBase
|
---|
34 | Dim returnValue As EnumBase
|
---|
35 | returnValue.m_Value = m_Value Or value.m_Value
|
---|
36 | Return returnValue
|
---|
37 | End Function
|
---|
38 |
|
---|
39 |
|
---|
40 | Function Operator and (ByRef value As EnumBase) As EnumBase
|
---|
41 | Dim returnValue As EnumBase
|
---|
42 | returnValue.m_Value = m_Value And value.m_Value
|
---|
43 | Return returnValue
|
---|
44 | End Function
|
---|
45 |
|
---|
46 | Function Operator not (ByRef value As EnumBase) As EnumBase
|
---|
47 | Dim returnValue As EnumBase
|
---|
48 | returnValue.m_Value = Not m_Value
|
---|
49 | Return returnValue
|
---|
50 | End Function
|
---|
51 |
|
---|
52 | Function Operator xor (ByRef value As EnumBase) As EnumBase
|
---|
53 | Dim returnValue As EnumBase
|
---|
54 | returnValue.m_Value = m_Value Xor value.m_Value
|
---|
55 | Return returnValue
|
---|
56 | End Function
|
---|
57 | End Class
|
---|
Note:
See
TracBrowser
for help on using the repository browser.