make ns3::Channel wholy pure.

This commit is contained in:
Mathieu Lacage committed 2008-03-24 13:33:41 -07:00
1 parent e260b2fa31
commit 9e44452453
11 files changed
+26 -35

No files matched your search

-6
View File
@@ -67,10 +67,4 @@ Channel::GetName(void)
return m_name;
}
Ptr<NetDevice>
Channel::GetDevice (uint32_t i) const
{
return DoGetDevice (i);
}
} // namespace ns3
+3 -7
View File
@@ -52,18 +52,14 @@ public:
/**
* \param i index of NetDevice to retrieve
* \returns one of the NetDevices connected to this channel.
*
* This method must be implemented by subclasses.
*/
Ptr<NetDevice> GetDevice (uint32_t i) const;
virtual Ptr<NetDevice> GetDevice (uint32_t i) const = 0;
protected:
virtual ~Channel ();
std::string m_name;
private:
/*
* This method must be implemented by subclasses.
*/
virtual Ptr<NetDevice> DoGetDevice (uint32_t i) const = 0;
};
}; // namespace ns3
+1 -1
View File
@@ -45,7 +45,7 @@ SimpleChannel::GetNDevices (void) const
return m_devices.size ();
}
Ptr<NetDevice>
SimpleChannel::DoGetDevice (uint32_t i) const
SimpleChannel::GetDevice (uint32_t i) const
{
return m_devices[i];
}
+1 -1
View File
@@ -22,9 +22,9 @@ public:
void Add (Ptr<SimpleNetDevice> device);
virtual uint32_t GetNDevices (void) const;
virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
private:
virtual Ptr<NetDevice> DoGetDevice (uint32_t i) const;
std::vector<Ptr<SimpleNetDevice> > m_devices;
};