summaryrefslogtreecommitdiff
path: root/sim/serialize.cc
diff options
context:
space:
mode:
authorAndrew Schultz <alschult@umich.edu>2003-10-31 17:32:04 -0500
committerAndrew Schultz <alschult@umich.edu>2003-10-31 17:32:04 -0500
commit2ab51fbcdb1d26d635875174eb23f60d6f9dc6bb (patch)
treea24dc79dca85e80ac7580a24a71299a939f07748 /sim/serialize.cc
parentb5fc3af142cfe71e6cb331dbed3b177193553a58 (diff)
downloadgem5-2ab51fbcdb1d26d635875174eb23f60d6f9dc6bb.tar.xz
Changed the naming of Serializeable derived objects. Serializeable no longer has
objName as a member, instead it has the pure virtual function name(). SimObject now has a objName member, and all classes derived directly from Serializeable have to implement a name() function (which now makes them unique by pointer value) cpu/simple_cpu/simple_cpu.cc: Change initialization of Event to get rid of Serializeable naming dev/etherlink.cc: dev/etherlink.hh: Seralizeable derived naming changes sim/eventq.cc: Serializeable derived naming changes, also changed serialization process so it doesn't need to use nameChildren sim/eventq.hh: Serializeable derived naming changes, remove constructor for specifying event name sim/serialize.cc: Serializeable derived naming changes, remove setName function and the child naming pass for serialization sim/serialize.hh: Serializeable derived naming changes, removed nameChildren, setName sim/sim_object.cc: sim/sim_object.hh: Serializeable derived naming changes --HG-- extra : convert_revision : 67bcc275b6c210f7049f98a1ad0d22e8f5596a63
Diffstat (limited to 'sim/serialize.cc')
-rw-r--r--sim/serialize.cc28
1 files changed, 2 insertions, 26 deletions
diff --git a/sim/serialize.cc b/sim/serialize.cc
index dfd495a32..84d400e16 100644
--- a/sim/serialize.cc
+++ b/sim/serialize.cc
@@ -49,8 +49,8 @@ using namespace std;
Serializer *Serializeable::serializer = NULL;
-Serializeable::Serializeable(const string &n)
- : objName(n), serialized(false)
+Serializeable::Serializeable()
+ : serialized(false)
{ }
Serializeable::~Serializeable()
@@ -209,16 +209,6 @@ Serializeable::childOut(const string &name, Serializeable *child)
}
#endif
-void
-Serializeable::setName(const string &name)
-{
- if (objName != "") {
- cprintf("Renaming object '%s' to '%s'.\n", objName, name);
- }
-
- objName = name;
-}
-
Serializer::Serializer()
{ }
@@ -272,20 +262,6 @@ Serializer::serialize(const string &f)
add_objects();
while (!objects.empty()) {
- Serializeable *serial = objects.front();
- DPRINTF(Serialize, "Naming children of %s\n", serial->name());
- serial->nameChildren();
- objects.pop_front();
- list.push_back(serial);
- }
-
- while (!list.empty()) {
- list.front()->serialized = false;
- list.pop_front();
- }
-
- add_objects();
- while (!objects.empty()) {
Serializeable *obj = objects.front();
DPRINTF(Serialize, "Serializing %s\n", obj->name());
obj->nameOut(out());