From: Kevin Lim Date: Sun, 25 Jun 2006 04:24:50 +0000 (-0400) Subject: Allow ports to be created without a name. X-Git-Tag: m5_2.0_beta1~36^2~45 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1a24337a82b04b4bb58499a46dc80f00bdc47d7;p=gem5.git Allow ports to be created without a name. --HG-- extra : convert_revision : 26dad6853feaf4f68907aab902c54259281cac1c --- diff --git a/src/mem/port.hh b/src/mem/port.hh index 2edad095e..17b1f4a00 100644 --- a/src/mem/port.hh +++ b/src/mem/port.hh @@ -74,7 +74,7 @@ class Port private: /** Descriptive name (for DPRINTF output) */ - const std::string portName; + mutable std::string portName; /** A pointer to the peer port. Ports always come in pairs, that way they can use a standardized interface to communicate between different @@ -83,6 +83,10 @@ class Port public: + Port() + : peer(NULL) + { } + /** * Constructor. * @@ -105,6 +109,9 @@ class Port RangeChange }; + void setName(const std::string &name) + { portName = name; } + /** Function to set the pointer for the peer port. @todo should be called by the configuration stuff (python). */