[Ns-bugs] [Bug 162] Calling Object::AggregateObject twice with the same Object type silently succeeds

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Thu Apr 10 05:13:03 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=162





------- Comment #9 from tomh at tomh.org  2008-04-10 08:13 -------
(In reply to comment #6)
> It is vastly easier to document and
> convey to users that each operation is allowed only once. 

I do not understand this point of view, in this specific case.  First of all,
Install() method is allowed to be invoked multiple times, if you consider other
helpers.

Second, this is a helper API.  It would help the user to not have to create or
maintain this special container that is only used to call
InternetStackHelper::Install ().  Whether or not your suggestion to assert on
finding a node with an internet stack already is adopted, users still need to
understand that this Install () is different than the other (e.g., device)
Install()s, semantically.  Why not make the semantics the most useful to the
user?

I still favor 
  /**
   * \param c the set of nodes
   *
   * For each node in the input container, aggregate implementations
-   * of the ns3::Ipv4, ns3::Udp, and, ns3::Tcp classes.
+   * of the ns3::Ipv4, ns3::Udp, and, ns3::Tcp classes if they are 
+   * not already present in the node.
   */
  void Install (NodeContainer c);


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list