/[RomCheater]/trunk/RomCheater.PluginFramework/Core/ConfigPlugin.cs
ViewVC logotype

Diff of /trunk/RomCheater.PluginFramework/Core/ConfigPlugin.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- 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 @@
     /// <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 @@
             }
         }
         #endregion
+        #region IAcceptsReadOnlyMemoryRange members
+        public virtual uint MemoryRangeStart { get; protected set; }
+        public virtual uint MemoryRangeSize { get; protected set; }
+        #endregion
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22