--- a/src/internet-node/i-arp-private.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/i-arp-private.cc Fri May 25 10:56:03 2007 +0200
@@ -25,12 +25,13 @@
namespace ns3 {
-const InterfaceId IArpPrivate::iid ("IArpPrivate");
+const InterfaceId IArpPrivate::iid = MakeInterfaceId ("IArpPrivate", Object::iid);
IArpPrivate::IArpPrivate (Ptr<Arp> arp)
- : Interface (IArpPrivate::iid),
- m_arp (arp)
-{}
+ : m_arp (arp)
+{
+ SetInterfaceId (IArpPrivate::iid);
+}
IArpPrivate::~IArpPrivate ()
{
NS_ASSERT (m_arp == 0);
@@ -48,7 +49,7 @@
IArpPrivate::DoDispose (void)
{
m_arp = 0;
- Interface::DoDispose ();
+ Object::DoDispose ();
}
--- a/src/internet-node/i-arp-private.h Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/i-arp-private.h Fri May 25 10:56:03 2007 +0200
@@ -21,7 +21,7 @@
#ifndef I_ARP_PRIVATE_H
#define I_ARP_PRIVATE_H
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/ipv4-address.h"
namespace ns3 {
@@ -31,7 +31,7 @@
class Packet;
class Arp;
-class IArpPrivate : public Interface
+class IArpPrivate : public Object
{
public:
static const InterfaceId iid;
--- a/src/internet-node/i-ipv4-private.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/i-ipv4-private.cc Fri May 25 10:56:03 2007 +0200
@@ -25,12 +25,13 @@
namespace ns3 {
-const InterfaceId IIpv4Private::iid ("IIpv4Private");
+const InterfaceId IIpv4Private::iid = MakeInterfaceId ("IIpv4Private", Object::iid);
IIpv4Private::IIpv4Private (Ptr<Ipv4> ipv4)
- : Interface (IIpv4Private::iid),
- m_ipv4 (ipv4)
-{}
+ : m_ipv4 (ipv4)
+{
+ SetInterfaceId (IIpv4Private::iid);
+}
IIpv4Private::~IIpv4Private ()
{
NS_ASSERT (m_ipv4 == 0);
@@ -60,7 +61,7 @@
IIpv4Private::DoDispose (void)
{
m_ipv4 = 0;
- Interface::DoDispose ();
+ Object::DoDispose ();
}
} // namespace ns3
--- a/src/internet-node/i-ipv4-private.h Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/i-ipv4-private.h Fri May 25 10:56:03 2007 +0200
@@ -21,7 +21,7 @@
#ifndef I_IPV4_PRIVATE_H
#define I_IPV4_PRIVATE_H
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/ipv4-address.h"
#include "ns3/ptr.h"
#include <stdint.h>
@@ -35,7 +35,7 @@
class Ipv4Interface;
class NetDevice;
-class IIpv4Private : public Interface
+class IIpv4Private : public Object
{
public:
static const InterfaceId iid;
--- a/src/internet-node/i-node-impl.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/i-node-impl.cc Fri May 25 10:56:03 2007 +0200
@@ -70,12 +70,12 @@
Ptr<IIpv4Impl> ipv4Impl = MakeNewObject<IIpv4Impl> (ipv4);
Ptr<IIpv4Private> ipv4Private = MakeNewObject<IIpv4Private> (ipv4);
- Interface::AddInterface (ipv4Private);
- Interface::AddInterface (ipv4Impl);
- Interface::AddInterface (arpPrivate);
- Interface::AddInterface (udpImpl);
- Interface::AddInterface (l3Demux);
- Interface::AddInterface (ipv4L4Demux);
+ Object::AddInterface (ipv4Private);
+ Object::AddInterface (ipv4Impl);
+ Object::AddInterface (arpPrivate);
+ Object::AddInterface (udpImpl);
+ Object::AddInterface (l3Demux);
+ Object::AddInterface (ipv4L4Demux);
}
--- a/src/internet-node/ipv4-l4-demux.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/ipv4-l4-demux.cc Fri May 25 10:56:03 2007 +0200
@@ -30,12 +30,13 @@
namespace ns3 {
-const InterfaceId Ipv4L4Demux::iid ("Ipv4L4Demux");
+const InterfaceId Ipv4L4Demux::iid = MakeInterfaceId ("Ipv4L4Demux", Object::iid);
Ipv4L4Demux::Ipv4L4Demux (Ptr<INode> node)
- : Interface (Ipv4L4Demux::iid),
- m_node (node)
-{}
+ : m_node (node)
+{
+ SetInterfaceId (Ipv4L4Demux::iid);
+}
Ipv4L4Demux::~Ipv4L4Demux()
{}
@@ -50,7 +51,7 @@
}
m_protocols.clear ();
m_node = 0;
- Interface::DoDispose ();
+ Object::DoDispose ();
}
TraceResolver *
--- a/src/internet-node/ipv4-l4-demux.h Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/ipv4-l4-demux.h Fri May 25 10:56:03 2007 +0200
@@ -26,7 +26,7 @@
#define IPV4_L4_DEMUX_H
#include <list>
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/ptr.h"
namespace ns3 {
@@ -39,7 +39,7 @@
/**
* \brief L4 Ipv4 Demux
*/
-class Ipv4L4Demux : public Interface
+class Ipv4L4Demux : public Object
{
public:
static const InterfaceId iid;
--- a/src/internet-node/l3-demux.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/l3-demux.cc Fri May 25 10:56:03 2007 +0200
@@ -29,12 +29,13 @@
namespace ns3 {
-const InterfaceId L3Demux::iid ("L3Demux");
+const InterfaceId L3Demux::iid = MakeInterfaceId ("L3Demux", Object::iid);
L3Demux::L3Demux (Ptr<INode> node)
- : Interface (L3Demux::iid),
- m_node (node)
-{}
+ : m_node (node)
+{
+ SetInterfaceId (L3Demux::iid);
+}
L3Demux::~L3Demux()
{}
@@ -49,7 +50,7 @@
}
m_protocols.clear ();
m_node = 0;
- Interface::DoDispose ();
+ Object::DoDispose ();
}
TraceResolver *
--- a/src/internet-node/l3-demux.h Fri May 25 10:52:58 2007 +0200
+++ b/src/internet-node/l3-demux.h Fri May 25 10:56:03 2007 +0200
@@ -28,7 +28,7 @@
#define L3_DEMUX_H
#include <map>
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/ptr.h"
namespace ns3 {
@@ -41,7 +41,7 @@
/**
* \brief L3 Demux
*/
-class L3Demux : public Interface
+class L3Demux : public Object
{
public:
static const InterfaceId iid;
--- a/src/node/channel.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/node/channel.cc Fri May 25 10:56:03 2007 +0200
@@ -27,19 +27,19 @@
namespace ns3 {
-const InterfaceId Channel::iid ("Channel");
+const InterfaceId Channel::iid = MakeInterfaceId ("Channel", Object::iid);
Channel::Channel ()
- : Interface (Channel::iid),
- m_name("Channel")
+ : m_name("Channel")
{
+ SetInterfaceId (Channel::iid);
NS_DEBUG("Channel::Channel ()");
}
Channel::Channel (std::string name)
- : Interface (Channel::iid),
- m_name(name)
+ : m_name(name)
{
+ SetInterfaceId (Channel::iid);
NS_DEBUG("Channel::Channel (" << name << ")");
}
--- a/src/node/channel.h Fri May 25 10:52:58 2007 +0200
+++ b/src/node/channel.h Fri May 25 10:56:03 2007 +0200
@@ -24,7 +24,7 @@
#include <string>
#include <stdint.h>
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/ptr.h"
namespace ns3 {
@@ -37,7 +37,7 @@
* A channel is a logical path over which information flows. The path can
* be as simple as a short piece of wire, or as complicated as space-time.
*/
-class Channel : public Interface
+class Channel : public Object
{
public:
static const InterfaceId iid;
--- a/src/node/i-ipv4.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/node/i-ipv4.cc Fri May 25 10:56:03 2007 +0200
@@ -22,11 +22,12 @@
namespace ns3 {
-const InterfaceId IIpv4::iid ("IIpv4");
+const InterfaceId IIpv4::iid = MakeInterfaceId ("IIpv4", Object::iid);
IIpv4::IIpv4 ()
- : Interface (IIpv4::iid)
-{}
+{
+ SetInterfaceId (IIpv4::iid);
+}
IIpv4::~IIpv4 ()
{}
--- a/src/node/i-ipv4.h Fri May 25 10:52:58 2007 +0200
+++ b/src/node/i-ipv4.h Fri May 25 10:56:03 2007 +0200
@@ -23,7 +23,7 @@
#include <stdint.h>
#include "ns3/ipv4-address.h"
-#include "ns3/interface.h"
+#include "ns3/object.h"
namespace ns3 {
@@ -40,7 +40,7 @@
* This class also allows you to control the content of the ipv4
* forwarding table.
*/
-class IIpv4 : public Interface
+class IIpv4 : public Object
{
public:
static const InterfaceId iid;
--- a/src/node/i-node.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/node/i-node.cc Fri May 25 10:56:03 2007 +0200
@@ -30,21 +30,21 @@
namespace ns3{
-const InterfaceId INode::iid ("INode");
+const InterfaceId INode::iid = MakeInterfaceId ("INode", Object::iid);
INode::INode()
- : Interface (INode::iid),
- m_id(0),
+ : m_id(0),
m_sid(0)
{
+ SetInterfaceId (INode::iid);
m_id = NodeList::Add (this);
}
INode::INode(uint32_t sid)
- : Interface (INode::iid),
- m_id(0),
+ : m_id(0),
m_sid(sid)
{
+ SetInterfaceId (INode::iid);
m_id = NodeList::Add (this);
}
@@ -126,7 +126,7 @@
*i = 0;
}
m_applications.clear ();
- Interface::DoDispose ();
+ Object::DoDispose ();
}
}//namespace ns3
--- a/src/node/i-node.h Fri May 25 10:52:58 2007 +0200
+++ b/src/node/i-node.h Fri May 25 10:56:03 2007 +0200
@@ -27,7 +27,7 @@
#include <vector>
-#include "ns3/interface.h"
+#include "ns3/object.h"
namespace ns3 {
@@ -53,7 +53,7 @@
*
* Every INode created is added to the NodeList automatically.
*/
-class INode : public Interface
+class INode : public Object
{
public:
static const InterfaceId iid;
--- a/src/node/i-socket-factory.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/node/i-socket-factory.cc Fri May 25 10:56:03 2007 +0200
@@ -22,10 +22,11 @@
namespace ns3 {
-const InterfaceId ISocketFactory::iid ("ISocketFactory");
+const InterfaceId ISocketFactory::iid = MakeInterfaceId ("ISocketFactory", Object::iid);
ISocketFactory::ISocketFactory ()
- : Interface (ISocketFactory::iid)
-{}
+{
+ SetInterfaceId (ISocketFactory::iid);
+}
} // namespace ns3
--- a/src/node/i-socket-factory.h Fri May 25 10:52:58 2007 +0200
+++ b/src/node/i-socket-factory.h Fri May 25 10:56:03 2007 +0200
@@ -21,14 +21,14 @@
#ifndef I_SOCKET_FACTORY_H
#define I_SOCKET_FACTORY_H
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/ptr.h"
namespace ns3 {
class Socket;
-class ISocketFactory : public Interface
+class ISocketFactory : public Object
{
public:
static const InterfaceId iid;
--- a/src/node/i-udp.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/node/i-udp.cc Fri May 25 10:56:03 2007 +0200
@@ -22,11 +22,11 @@
namespace ns3 {
-const InterfaceId IUdp::iid ("IUdp");
+const InterfaceId IUdp::iid = MakeInterfaceId ("IUdp", ISocketFactory::iid);
IUdp::IUdp ()
{
- AddSelfInterface (IUdp::iid, this);
+ SetInterfaceId (IUdp::iid);
}
} // namespace ns3
--- a/src/node/net-device.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/node/net-device.cc Fri May 25 10:56:03 2007 +0200
@@ -21,7 +21,7 @@
#include <iostream>
#include "ns3/assert.h"
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "channel.h"
#include "net-device.h"
@@ -30,10 +30,9 @@
namespace ns3 {
-const InterfaceId NetDevice::iid ("NetDevice");
+const InterfaceId NetDevice::iid = MakeInterfaceId ("NetDevice", Object::iid);
NetDevice::NetDevice(Ptr<INode> node, const MacAddress& addr) :
- Interface (NetDevice::iid),
m_node (node),
m_name(""),
m_ifIndex (0),
@@ -44,6 +43,7 @@
m_isMulticast (false),
m_isPointToPoint (false)
{
+ SetInterfaceId (NetDevice::iid);
m_node->AddDevice (this);
}
--- a/src/node/net-device.h Fri May 25 10:52:58 2007 +0200
+++ b/src/node/net-device.h Fri May 25 10:56:03 2007 +0200
@@ -25,7 +25,7 @@
#include <stdint.h>
#include "ns3/callback.h"
#include "ns3/packet.h"
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/ptr.h"
#include "mac-address.h"
@@ -55,7 +55,7 @@
* this base class and implement your own version of the
* NetDevice::SendTo method.
*/
-class NetDevice : public Interface
+class NetDevice : public Object
{
public:
static const InterfaceId iid;
--- a/src/node/queue.cc Fri May 25 10:52:58 2007 +0200
+++ b/src/node/queue.cc Fri May 25 10:56:03 2007 +0200
@@ -27,10 +27,9 @@
namespace ns3 {
-const InterfaceId Queue::iid ("Queue");
+const InterfaceId Queue::iid = MakeInterfaceId ("Queue", Object::iid);
Queue::Queue() :
- Interface (Queue::iid),
m_nBytes(0),
m_nTotalReceivedBytes(0),
m_nPackets(0),
@@ -38,6 +37,7 @@
m_nTotalDroppedBytes(0),
m_nTotalDroppedPackets(0)
{
+ SetInterfaceId (Queue::iid);
NS_DEBUG("Queue::Queue ()");
}
--- a/src/node/queue.h Fri May 25 10:52:58 2007 +0200
+++ b/src/node/queue.h Fri May 25 10:56:03 2007 +0200
@@ -28,7 +28,7 @@
#include <string>
#include <list>
#include "ns3/packet.h"
-#include "ns3/interface.h"
+#include "ns3/object.h"
#include "ns3/callback-trace-source.h"
#include "ns3/trace-resolver.h"
@@ -41,7 +41,7 @@
*
* This class defines the base APIs for packet queues in the ns-3 system
*/
-class Queue : public Interface
+class Queue : public Object
{
public:
static const InterfaceId iid;
--- a/utils/bench-object.cc Fri May 25 10:52:58 2007 +0200
+++ b/utils/bench-object.cc Fri May 25 10:56:03 2007 +0200
@@ -7,7 +7,7 @@
class BaseA : public ns3::Object
{
public:
- static const ns3::MyInterfaceId iid;
+ static const ns3::InterfaceId iid;
BaseA ()
{
SetInterfaceId (BaseA::iid);
@@ -15,7 +15,7 @@
virtual void Dispose (void) {}
};
-const ns3::MyInterfaceId BaseA::iid =
+const ns3::InterfaceId BaseA::iid =
ns3::MakeInterfaceId ("BaseABench", Object::iid);