Bug 636

Summary: src/core should not depend on src/simulator
Product: ns-3 Reporter: Mathieu Lacage <mathieu.lacage>
Component: coreAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: craigdo, faker.moatamri
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

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.