diff options
Diffstat (limited to 'src/sim/sim_object.hh')
-rw-r--r-- | src/sim/sim_object.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh index 2e99a85bf..b70f1d5d3 100644 --- a/src/sim/sim_object.hh +++ b/src/sim/sim_object.hh @@ -84,9 +84,14 @@ class SimObject : public Serializable, protected StartupCallback typedef SimObjectParams Params; const Params *params() const { return _params; } SimObject(const Params *_params); - SimObject(const std::string &_name); virtual ~SimObject() {} + protected: + // static: support for old-style constructors (call manually) + static Params *makeParams(const std::string &name); + + public: + virtual const std::string name() const { return params()->name; } // initialization pass of all objects. |