add CreateObject<> to instanciate subclasses of the Object base class. Replaces Create<>.

This commit is contained in:
Mathieu Lacage
2008-01-02 09:09:24 +01:00
parent 906a9748b5
commit 6b0e717a19
77 changed files with 403 additions and 359 deletions

View File

@@ -41,11 +41,11 @@ main (int argc, char *argv[])
uint32_t port = 7;
Ptr<Node> n0 = bus.GetNode (0);
Ptr<UdpEchoClient> client = Create<UdpEchoClient> (n0, "10.1.0.1", port,
Ptr<UdpEchoClient> client = CreateObject<UdpEchoClient> (n0, "10.1.0.1", port,
1, Seconds(1.), 1024);
Ptr<Node> n1 = bus.GetNode (1);
Ptr<UdpEchoServer> server = Create<UdpEchoServer> (n1, port);
Ptr<UdpEchoServer> server = CreateObject<UdpEchoServer> (n1, port);
server->Start(Seconds(1.));
client->Start(Seconds(2.));