Last change
on this file since 174 was 173, checked in by dai, 18 years ago |
EnumBaseの=演算子オーバーロードのコードを排除。
その他タイプミスを修正。
|
File size:
1.2 KB
|
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 | Function Operator() As Long
|
---|
18 | Return m_Value
|
---|
19 | End Function
|
---|
20 |
|
---|
21 | Function Operator == (Value As Long) As Long
|
---|
22 | If m_Value = Value Then
|
---|
23 | Return _System_TRUE
|
---|
24 | Else
|
---|
25 | Return _System_FALSE
|
---|
26 | End If
|
---|
27 | End Function
|
---|
28 |
|
---|
29 | Function Operator or (ByRef value As EnumBase) As EnumBase
|
---|
30 | Dim returnValue As EnumBase
|
---|
31 | returnValue.m_Value = m_Value Or value.m_Value
|
---|
32 | Return returnValue
|
---|
33 | End Function
|
---|
34 |
|
---|
35 |
|
---|
36 | Function Operator and (ByRef value As EnumBase) As EnumBase
|
---|
37 | Dim returnValue As EnumBase
|
---|
38 | returnValue.m_Value = m_Value And value.m_Value
|
---|
39 | Return returnValue
|
---|
40 | End Function
|
---|
41 |
|
---|
42 | Function Operator not (ByRef value As EnumBase) As EnumBase
|
---|
43 | Dim returnValue As EnumBase
|
---|
44 | returnValue.m_Value = Not m_Value
|
---|
45 | Return returnValue
|
---|
46 | End Function
|
---|
47 |
|
---|
48 | Function Operator xor (ByRef value As EnumBase) As EnumBase
|
---|
49 | Dim returnValue As EnumBase
|
---|
50 | returnValue.m_Value = m_Value Xor value.m_Value
|
---|
51 | Return returnValue
|
---|
52 | End Function
|
---|
53 | End Class
|
---|
Note:
See
TracBrowser
for help on using the repository browser.