Bug 1068 - replace virtual method with callbacks
replace virtual method with callbacks
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-07 08:12 UTC by Andrey Churin
Modified: 2011-07-06 18:52 UTC (History)
1 user (show)

See Also:


Attachments
patch to replace virtual method with callbacks (3.35 KB, patch)
2011-07-06 18:37 UTC, Mathieu Lacage
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Churin 2011-03-07 08:12:10 UTC
virtual method NotifyDeviceAdded really should be private? Perhaps it would be better to make it protected?
Comment 1 Mathieu Lacage 2011-07-06 18:36:11 UTC
(In reply to comment #0)
> virtual method NotifyDeviceAdded really should be private? Perhaps it would be
> better to make it protected?

a private virtual method can be overriden by subclasses to get the event so, not, it should not be protected.

However, this code is really old and comes from the Node-as-base-class design we had a long time ago. I have been using the attached patch for a while so, I committed it together with a removal of the virtual keyword.
Comment 2 Mathieu Lacage 2011-07-06 18:37:36 UTC
Created attachment 1191 [details]
patch to replace virtual method with callbacks
Comment 3 Mathieu Lacage 2011-07-06 18:51:47 UTC
changeset e440347eff27