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
This commit is contained in:
Andrew Schultz
2003-10-31 17:32:04 -05:00
parent b5fc3af142
commit 2ab51fbcdb
9 changed files with 55 additions and 88 deletions

View File

@@ -80,7 +80,7 @@ EtherLink::Interface::Interface(const std::string &name, Link *tx, Link *rx)
}
EtherLink::Link::Link(const std::string &name, double rate, EtherDump *d)
: Serializeable(name), txint(NULL), rxint(NULL), ticks_per_byte(rate),
: objName(name), txint(NULL), rxint(NULL), ticks_per_byte(rate),
dump(d), event(&mainEventQueue, this)
{}

View File

@@ -54,6 +54,8 @@ class EtherLink : public SimObject
*/
class Link : public Serializeable {
protected:
std::string objName;
Interface *txint;
Interface *rxint;
@@ -87,6 +89,8 @@ class EtherLink : public SimObject
Link(const std::string &name, double rate, EtherDump *dump);
~Link() {}
virtual std::string name() const { return objName; }
bool busy() const { return (bool)packet; }
bool transmit(PacketPtr packet);