Bug 636 - src/core should not depend on src/simulator
src/core should not depend on src/simulator
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-13 03:15 UTC by Mathieu Lacage
Modified: 2009-09-29 01:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Lacage 2009-07-13 03:15:49 UTC
names.cc now includes simulator.h: this should not happen because src/core is not supposed to be using the simulator module directly. It's supposed to be the other way around. There are a couple of options:
1) move this code in common which depends on both core and simulator
2) find a way to make names.cc not depend on simulator.h anymore

I can't think of other options for now.
Comment 1 Faker Moatamri 2009-08-04 05:20:54 UTC
It looks like this include is used only for the line 127:
Simulator::ScheduleDestroy (&NamesPriv::Delete);
I think the second option should be more acceptable. If we remove this line we can remove this include. Now we should see what is the use of this line of code and if we can do the same in another way.
Regards
Faker
Comment 2 Craig Dowell 2009-08-04 12:34:17 UTC
The NamesPriv object just needs to be made a proper singleton that is constructed once at first use and destructed at the end of time.