ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.PluginFramework/Core/ConfigPlugin.cs
(Generate patch)

Comparing trunk/RomCheater.PluginFramework/Core/ConfigPlugin.cs (file contents):
Revision 388 by william, Thu Jun 7 19:20:44 2012 UTC vs.
Revision 389 by william, Tue Jun 19 12:47:26 2012 UTC

--- trunk/RomCheater.PluginFramework/Core/ConfigPlugin.cs	2012/06/19 11:59:13	388
+++ trunk/RomCheater.PluginFramework/Core/ConfigPlugin.cs	2012/06/19 12:47:26	389
@@ -16,10 +16,17 @@ namespace RomCheater.PluginFramework.Cor
     /// <summary>
     /// Base class for all configuration plugins
     /// </summary>
-    public abstract class ConfigPlugin : PluginBase, IConfigPlugin
+    public abstract class ConfigPlugin : PluginBase, IConfigPlugin, IAcceptsReadOnlyMemoryRange
     {
         public ConfigPlugin() : this(false) { }
-        public ConfigPlugin(bool doinit) : base() { this.ValidProcessesForPlugin = new List<ProcContainer>(); if (doinit) init(); }
+        public ConfigPlugin(bool doinit) : base() { SetupConfig(); if (doinit) init(); }
+
+        private void SetupConfig()
+        {
+            this.ValidProcessesForPlugin = new List<ProcContainer>();
+            MemoryRangeStart = 0;
+            MemoryRangeSize = int.MaxValue;
+        }
 
         public override void Reload(bool silent)
         {
@@ -140,5 +147,9 @@ namespace RomCheater.PluginFramework.Cor
             }
         }
         #endregion
+        #region IAcceptsReadOnlyMemoryRange members
+        public virtual uint MemoryRangeStart { get; protected set; }
+        public virtual uint MemoryRangeSize { get; protected set; }
+        #endregion
     }
 }