aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Memory/Range/IRange.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Memory/Range/IRange.cs')
-rw-r--r--src/Ryujinx.Memory/Range/IRange.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Ryujinx.Memory/Range/IRange.cs b/src/Ryujinx.Memory/Range/IRange.cs
new file mode 100644
index 00000000..1685396d
--- /dev/null
+++ b/src/Ryujinx.Memory/Range/IRange.cs
@@ -0,0 +1,31 @@
+namespace Ryujinx.Memory.Range
+{
+ /// <summary>
+ /// Range of memory.
+ /// </summary>
+ public interface IRange
+ {
+ /// <summary>
+ /// Base address.
+ /// </summary>
+ ulong Address { get; }
+
+ /// <summary>
+ /// Size of the range.
+ /// </summary>
+ ulong Size { get; }
+
+ /// <summary>
+ /// End address.
+ /// </summary>
+ ulong EndAddress { get; }
+
+ /// <summary>
+ /// Check if this range overlaps with another.
+ /// </summary>
+ /// <param name="address">Base address</param>
+ /// <param name="size">Size of the range</param>
+ /// <returns>True if overlapping, false otherwise</returns>
+ bool OverlapsWith(ulong address, ulong size);
+ }
+} \ No newline at end of file