Changeset 475 for trunk/Include/system
- Timestamp:
- Mar 13, 2008, 9:44:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/system/enum.sbp
r446 r475 1 Class EnumBase 1 Class EnumBase<T As EnumBase> 2 2 Protected 3 3 value As Long … … 40 40 41 41 Function Operator == (value As Long) As Boolean 42 If This.value = value Then 43 Return True 44 Else 45 Return False 46 End If 42 Return ( This.value = value ) 47 43 End Function 48 44 49 Function Operator == (enumBase As EnumBase) As Boolean 50 If This.value = enumBase.value Then 51 Return True 52 Else 53 Return False 54 End If 45 Function Operator == (enumObj As T) As Boolean 46 Return ( This.value = enumObj.value ) 55 47 End Function 56 48 … … 59 51 End Function 60 52 61 Function Operator <> (enum Base As EnumBase) As Boolean62 Return Not( This = enum Base)53 Function Operator <> (enumObj As T) As Boolean 54 Return Not( This = enumObj) 63 55 End Function 64 56 65 Function Operator or (enum Base As EnumBase) As Boolean66 Return ( This.value or enum Base.value ) <> 057 Function Operator or (enumObj As T) As Boolean 58 Return ( This.value or enumObj.value ) <> 0 67 59 End Function 68 60 69 Function Operator and (enum Base As EnumBase) As Boolean70 Return ( This.value and enum Base.value ) <> 061 Function Operator and (enumObj As T) As Boolean 62 Return ( This.value and enumObj.value ) <> 0 71 63 End Function 72 64 73 Function Operator or (enum Base As EnumBase) As EnumBase74 Return New EnumBase( This.value or enum Base.value, This.lpszName )65 Function Operator or (enumObj As T) As T 66 Return New EnumBase( This.value or enumObj.value, This.lpszName ) 75 67 End Function 76 68 77 Function Operator and (enum Base As EnumBase) As EnumBase78 Return New EnumBase( This.value and enum Base.value, This.lpszName )69 Function Operator and (enumObj As T) As T 70 Return New EnumBase( This.value and enumObj.value, This.lpszName ) 79 71 End Function 80 72 /*
Note:
See TracChangeset
for help on using the changeset viewer.