Class EnumBase
Protected
	value As Long
	lpszName As LPTSTR
Public
	Sub EnumBase(value As Long,lpszName As LPTSTR)
		This.value = value
		This.lpszName = lpszName
	End Sub

	Sub EnumBase( enumBase As EnumBase )
		This.value = enumBase.value
		This.lpszName = enumBase.lpszName
	End Sub

	Sub ~EnumBase()
	End Sub

	Override Function ToString() As String
		Return New String( lpszName )
	End Function

	Sub Copy(obj As EnumBase)
		This.value = obj.value
		This.lpszName = obj.lpszName
	End Sub

	Function Operator() As Int64
		Return This.value
	End Function
	Function Operator() As Long
		Return This.value
	End Function
	Function Operator() As DWord
		Return This.value
	End Function
	Function Operator() As Boolean
		Return ( This.value <> 0 )
	End Function

	Function Operator == (value As Long) As Boolean
		If This.value = value Then
			Return True
		Else
			Return False
		End If
	End Function

	Function Operator == (enumBase As EnumBase) As Boolean
		If This.value = enumBase.value Then
			Return True
		Else
			Return False
		End If
	End Function

	Function Operator <> (value As Long) As Boolean
		Return Not( This = value)
	End Function

	Function Operator <> (enumBase As EnumBase) As Boolean
		Return Not( This = enumBase)
	End Function

	Function Operator or (enumBase As EnumBase) As Boolean
		Return ( This.value or enumBase.value ) <> 0
	End Function

	Function Operator and (enumBase As EnumBase) As Boolean
		Return ( This.value and enumBase.value ) <> 0
	End Function

	Function Operator or (enumBase As EnumBase) As EnumBase
		Return New EnumBase( This.value or enumBase.value, This.lpszName )
	End Function

	Function Operator and (enumBase As EnumBase) As EnumBase
		Return New EnumBase( This.value and enumBase.value, This.lpszName )
	End Function
/*
	Function Operator xor (enumBase As EnumBase) As EnumBase
		Return New EnumBase(This.value Xor enumBase.value)
	End Function
*/
End Class
