summaryrefslogtreecommitdiff
path: root/sim/sim_object.hh
diff options
context:
space:
mode:
Diffstat (limited to 'sim/sim_object.hh')
-rw-r--r--sim/sim_object.hh17
1 files changed, 11 insertions, 6 deletions
diff --git a/sim/sim_object.hh b/sim/sim_object.hh
index b8a3090ad..db8d4f4d3 100644
--- a/sim/sim_object.hh
+++ b/sim/sim_object.hh
@@ -48,8 +48,16 @@
*/
class SimObject : public Serializable, protected StartupCallback
{
+ public:
+ struct Params {
+ std::string name;
+ };
+
protected:
- std::string objName;
+ Params *_params;
+
+ public:
+ const Params *params() const { return _params; }
private:
friend class Serializer;
@@ -60,15 +68,12 @@ class SimObject : public Serializable, protected StartupCallback
static SimObjectList simObjectList;
public:
-
-// for Params struct
-#include "simobj/param/SimObject.hh"
-
+ SimObject(Params *_params);
SimObject(const std::string &_name);
virtual ~SimObject() {}
- virtual const std::string name() const { return objName; }
+ virtual const std::string name() const { return params()->name; }
// initialization pass of all objects.
// Gets invoked after construction, before unserialize.