sim: Move SimObject resolver to sim_object.hh
authorAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 1 Sep 2015 12:40:05 +0000 (13:40 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 1 Sep 2015 12:40:05 +0000 (13:40 +0100)
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.

src/sim/serialize.hh
src/sim/sim_object.hh

index a0be62db5c20ddca371277b8911502bb88264328..356547881b231703947a46a02d5bdb8ea272be1b 100644 (file)
@@ -64,6 +64,7 @@ class IniFile;
 class Serializable;
 class CheckpointIn;
 class SimObject;
+class SimObjectResolver;
 class EventQueue;
 
 typedef std::ostream CheckpointOut;
@@ -449,17 +450,6 @@ class SerializableClass
 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
 {
index c56dfd8bfedad21d49f6553b4ccb152375553436..d2cedf5bef06b66a9c9df85d73d55693c03f4e38 100644 (file)
@@ -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