Port: Hide the queue implementation in SimpleTimingPort

This patch makes the queue implementation in the SimpleTimingPort
private to avoid confusion with the protected member queue in the
QueuedSlavePort. The SimpleTimingPort provides the queue_impl to the
QueuedSlavePort and it can be accessed via the reference in the base
class. The use of the member name queue is thus no longer overloaded.
This commit is contained in:
Andreas Hansson 2012-07-09 12:35:42 -04:00
parent fda338f8d3
commit 67e257f442
2 changed files with 11 additions and 4 deletions

View file

@ -46,7 +46,7 @@
SimpleTimingPort::SimpleTimingPort(const std::string& _name,
MemObject* _owner) :
QueuedSlavePort(_name, _owner, queue), queue(*_owner, *this)
QueuedSlavePort(_name, _owner, queueImpl), queueImpl(*_owner, *this)
{
}

View file

@ -60,10 +60,17 @@
class SimpleTimingPort : public QueuedSlavePort
{
protected:
private:
/** The packet queue used to store outgoing responses. */
SlavePacketQueue queue;
/**
* The packet queue used to store outgoing responses. Note that
* the queue is made private and that we avoid overloading the
* name used in the QueuedSlavePort. Access is provided through
* the queue reference in the base class.
*/
SlavePacketQueue queueImpl;
protected:
/** Implemented using recvAtomic(). */
void recvFunctional(PacketPtr pkt);