Changeset 210
- Timestamp:
- Apr 10, 2007, 2:16:15 AM (18 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/system/enum.sbp
r201 r210 1 1 Class EnumBase 2 2 Protected 3 m_Value As Long 3 value As Long 4 lpszName As LPSTR 4 5 Public 5 Sub EnumBase(value As Long) 6 m_Value=value 6 Sub EnumBase(value As Long,lpszName As LPSTR) 7 This.value = value 8 This.lpszName = lpszName 7 9 End Sub 8 10 … … 10 12 End Sub 11 13 12 'Abstract Function ToString() As String 14 Override Function ToString() As String 15 Return New String( lpszName ) 16 End Function 13 17 14 Sub Copy(ByRef obj As EnumBase) 15 m_Value=obj.m_Value 18 Sub Copy(obj As EnumBase) 19 This.value = obj.value 20 This.lpszName = obj.lpszName 16 21 End Sub 17 22 18 23 Function Operator() As Long 19 Return m_Value24 Return This.value 20 25 End Function 21 26 22 Function Operator == ( Value As Long) As Boolean23 If m_Value = Value Then27 Function Operator == (value As Long) As Boolean 28 If This.value = value Then 24 29 Return True 25 30 Else … … 28 33 End Function 29 34 30 Function Operator or (ByRef value As EnumBase) As EnumBase 31 Return New EnumBase(m_Value Or value.m_Value) 35 Function Operator == (enumBase As EnumBase) As Boolean 36 If This.value = enumBase.value Then 37 Return True 38 Else 39 Return False 40 End If 32 41 End Function 33 42 34 Function Operator and (ByRef value As EnumBase) As EnumBase35 Return New EnumBase( m_Value And value.m_Value)43 Function Operator or (enumBase As EnumBase) As EnumBase 44 Return New EnumBase(This.value Or enumBase.value) 36 45 End Function 37 46 38 Function Operator not (ByRef value As EnumBase) As EnumBase39 Return New EnumBase( Not m_Value)47 Function Operator and (enumBase As EnumBase) As EnumBase 48 Return New EnumBase(This.value And enumBase.value) 40 49 End Function 41 50 42 Function Operator xor ( ByRef value As EnumBase) As EnumBase43 Return New EnumBase( m_Value Xor value.m_Value)51 Function Operator xor (enumBase As EnumBase) As EnumBase 52 Return New EnumBase(This.value Xor enumBase.value) 44 53 End Function 45 54 End Class
Note:
See TracChangeset
for help on using the changeset viewer.