summaryrefslogtreecommitdiff
path: root/src/dev/net/etherbus.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-03-06 17:29:43 -0800
committerGabe Black <gabeblack@google.com>2019-03-15 18:12:58 +0000
commitf5ba0d66459c1c035d4613376d1d39af08e483de (patch)
tree2deb1b27c75279df5467d6035d27a0007380d01f /src/dev/net/etherbus.hh
parent94a00fb6d9270990cd04ae293556297a3c2f2563 (diff)
downloadgem5-f5ba0d66459c1c035d4613376d1d39af08e483de.tar.xz
dev: Turn EtherObject into an interface class.
This class used to drive from SimObject so that it could be derived from to get both the interface and SimObject while still using single inheritance. With this change, EtherObject is now just an interface class with only one pure virtual function which can be inherited alongside SimObject. This makes it more flexible so that it can be used in places where you might want a different inheritance hierarchy, for instance to inherit from MemObject. Change-Id: I0f07664d104eed012cf4ce6e30c416ada19505a7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17028 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/net/etherbus.hh')
-rw-r--r--src/dev/net/etherbus.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dev/net/etherbus.hh b/src/dev/net/etherbus.hh
index 1b264533c..8c1260fc5 100644
--- a/src/dev/net/etherbus.hh
+++ b/src/dev/net/etherbus.hh
@@ -43,7 +43,7 @@
class EtherDump;
class EtherInt;
-class EtherBus : public EtherObject
+class EtherBus : public SimObject, public EtherObject
{
protected:
typedef std::list<EtherInt *> devlist_t;
@@ -72,7 +72,7 @@ class EtherBus : public EtherObject
void reg(EtherInt *dev);
bool busy() const { return (bool)packet; }
bool send(EtherInt *sender, EthPacketPtr &packet);
- virtual EtherInt *getEthPort(const std::string &if_name, int idx);
+ EtherInt *getEthPort(const std::string &if_name, int idx) override;
};
#endif // __DEV_NET_ETHERBUS_HH__