changeset 5379f099e488 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=5379f099e488
description:
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:
src/sim/serialize.hh | 12 +-----------
src/sim/sim_object.hh | 15 +++++++++++++++
2 files changed, 16 insertions(+), 11 deletions(-)
diffs (54 lines):
diff -r 969113566d50 -r 5379f099e488 src/sim/serialize.hh
--- a/src/sim/serialize.hh Sun Aug 30 12:24:19 2015 -0500
+++ b/src/sim/serialize.hh Tue Sep 01 13:40:05 2015 +0100
@@ -64,6 +64,7 @@
class Serializable;
class CheckpointIn;
class SimObject;
+class SimObjectResolver;
class EventQueue;
typedef std::ostream CheckpointOut;
@@ -449,17 +450,6 @@
SerializableClass the##OBJ_CLASS##Class(CLASS_NAME, \
OBJ_CLASS::createForUnserialize);
-// Base class to wrap object resolving functionality. This can be
-// provided to Checkpoint to allow it to map object names onto
-// object C++ objects in which to unserialize
-class SimObjectResolver
-{
- public:
- virtual ~SimObjectResolver() { }
-
- // Find a SimObject given a full path name
- virtual SimObject *resolveSimObject(const std::string &name) = 0;
-};
class CheckpointIn
{
diff -r 969113566d50 -r 5379f099e488 src/sim/sim_object.hh
--- a/src/sim/sim_object.hh Sun Aug 30 12:24:19 2015 -0500
+++ b/src/sim/sim_object.hh Tue Sep 01 13:40:05 2015 +0100
@@ -231,6 +231,21 @@
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
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev