garnet: added network ptr to links to be used by orion
[gem5.git] / src / mem / mem_object.hh
index d12eeffe062a3c7e4a2ce87356ee4bcff78170b7..b8bf4b939052b847b3064270cbbe69ce265e9fc4 100644 (file)
@@ -36,8 +36,9 @@
 #ifndef __MEM_MEM_OBJECT_HH__
 #define __MEM_MEM_OBJECT_HH__
 
-#include "sim/sim_object.hh"
 #include "mem/port.hh"
+#include "params/MemObject.hh"
+#include "sim/sim_object.hh"
 
 /**
  * The base MemoryObject class, allows for an accesor function to a
 class MemObject : public SimObject
 {
   public:
-    MemObject(const std::string &name);
+    typedef MemObjectParams Params;
+    const Params *params() const
+    { return dynamic_cast<const Params *>(_params); }
+
+    MemObject(const Params *params);
 
   public:
     /** Additional function to return the Port of a memory object. */
     virtual Port *getPort(const std::string &if_name, int idx = -1) = 0;
+
+    /** Tell object that this port is about to disappear, so it should remove it
+     * from any structures that it's keeping it in. */
+    virtual void deletePortRefs(Port *p) ;
 };
 
 #endif //__MEM_MEM_OBJECT_HH__