1 |
using System; |
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
|
6 |
namespace RomCheater.Docking.MemorySearch |
7 |
{ |
8 |
public class _32bit_unsigned_comparer_ : MemComparer<uint>, IMemComparer<uint> |
9 |
{ |
10 |
public _32bit_unsigned_comparer_(SearchType search_settings, int FoundAddress) |
11 |
: base(search_settings, FoundAddress, 0) |
12 |
{ |
13 |
} |
14 |
|
15 |
#region IMemComparer<T> Members |
16 |
public bool Compare(uint CompareToValue, uint CompareFromValue) |
17 |
{ |
18 |
this.Value = CompareToValue; |
19 |
switch (base.SearchSettings.CompareType) |
20 |
{ |
21 |
case SearchCompareTypes.Equal: |
22 |
return (CompareToValue == CompareFromValue); |
23 |
case SearchCompareTypes.GreaterThan: |
24 |
return (CompareToValue > CompareFromValue); |
25 |
case SearchCompareTypes.GreaterThanOrEqual: |
26 |
return (CompareToValue >= CompareFromValue); |
27 |
case SearchCompareTypes.LessThan: |
28 |
return (CompareToValue < CompareFromValue); |
29 |
case SearchCompareTypes.LessThanOrEqual: |
30 |
return (CompareToValue <= CompareFromValue); |
31 |
case SearchCompareTypes.NotEqual: |
32 |
return (CompareToValue != CompareFromValue); |
33 |
} |
34 |
return false; |
35 |
} |
36 |
#endregion |
37 |
} |
38 |
} |