diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-09-01 13:40:05 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-09-01 13:40:05 +0100 |
commit | db465fd7888337e90269e1efd2af995cb6bc4ca9 (patch) | |
tree | 531a99e061840b16bf31c0dde335be476343f77e /src/sim/sim_object.hh | |
parent | 66941163e50abceaa86c5eb6a18de6bbc2ec4ef8 (diff) | |
download | gem5-db465fd7888337e90269e1efd2af995cb6bc4ca9.tar.xz |
sim: Move SimObject resolver to sim_object.hh
The object resolver isn't serialization specific and shouldn't live in
serialize.hh. Move it to sim_object.hh since it queries to the
SimObject hierarchy.
Diffstat (limited to 'src/sim/sim_object.hh')
-rw-r--r-- | src/sim/sim_object.hh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh index c56dfd8bf..d2cedf5be 100644 --- a/src/sim/sim_object.hh +++ b/src/sim/sim_object.hh @@ -231,6 +231,21 @@ class SimObject : public EventManager, public Serializable, public Drainable static SimObject *find(const char *name); }; +/** + * Base class to wrap object resolving functionality. + * + * This can be provided to the serialization framework to allow it to + * map object names onto C++ objects. + */ +class SimObjectResolver +{ + public: + virtual ~SimObjectResolver() { } + + // Find a SimObject given a full path name + virtual SimObject *resolveSimObject(const std::string &name) = 0; +}; + #ifdef DEBUG void debugObjectBreak(const char *objs); #endif |