Bug 1019 - common --> node --> common circular dependency
common --> node --> common circular dependency
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: general
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-26 10:09 EDT by Gustavo J. A. M. Carneiro
Modified: 2011-01-20 16:32 EST (History)
1 user (show)

See Also:


Attachments
proposed patch (2.26 KB, patch)
2010-11-09 23:08 EST, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2010-10-26 10:09:14 EDT
src/common/propagation-loss-model.cc:

void
MatrixPropagationLossModel::SetLoss (Ptr<Node> a, Ptr<Node> b, double loss, bool symmetric)
Comment 1 Gustavo J. A. M. Carneiro 2010-10-31 11:13:23 EDT
And of course #include "ns3/node.h" in src/common/propagation-loss-model.h.  This is blocking my modular Python bindings work.
Comment 2 Mitch Watrous 2010-11-01 15:31:01 EDT
Would this be solved by putting the following modules into a lowest level
module that doesn't depend on any other modules:

    common
    core
    node
    helper
Comment 3 Gustavo J. A. M. Carneiro 2010-11-07 19:03:09 EST
(In reply to comment #2)
> Would this be solved by putting the following modules into a lowest level
> module that doesn't depend on any other modules:
> 
>     common
>     core
>     node
>     helper

A simpler option in this case is to change the signature of the method from:


    MatrixPropagationLossModel::SetLoss (Ptr<Node> a, Ptr<Node> b, double loss,
bool symmetric)

to:


    MatrixPropagationLossModel::SetLoss (Ptr<Object> a, Ptr<Object> b, double loss,
bool symmetric)
Comment 4 Tom Henderson 2010-11-09 23:08:45 EST
Created attachment 1011 [details]
proposed patch
Comment 5 Mitch Watrous 2011-01-20 16:32:39 EST
Bug closed.

ns-3-dev changeset: bb040260d75c