Bug 1019: common --> node --> common circular dependency

This commit is contained in:
Mitch Watrous
2011-01-20 13:28:38 -08:00
parent c5b17c156d
commit 617664dd49
3 changed files with 8 additions and 8 deletions

View File

@@ -368,11 +368,11 @@ MatrixPropagationLossModelTestCase::~MatrixPropagationLossModelTestCase ()
void
MatrixPropagationLossModelTestCase::DoRun (void)
{
Ptr<Node> n[3];
Ptr<Object> n[3];
Ptr<MobilityModel> m[3];
for (int i = 0; i < 3; ++i)
{
n[i] = CreateObject<Node> ();
n[i] = CreateObject<Object> ();
m[i] = CreateObject<ConstantPositionMobilityModel> ();
n[i]->AggregateObject (m[i]);
}

View File

@@ -747,7 +747,7 @@ MatrixPropagationLossModel::SetDefaultLoss (double loss)
}
void
MatrixPropagationLossModel::SetLoss (Ptr<Node> a, Ptr<Node> b, double loss, bool symmetric)
MatrixPropagationLossModel::SetLoss (Ptr<Object> a, Ptr<Object> b, double loss, bool symmetric)
{
Ptr<MobilityModel> ma = a->GetObject<MobilityModel> ();
Ptr<MobilityModel> mb = b->GetObject<MobilityModel> ();

View File

@@ -27,7 +27,6 @@
#include "ns3/object.h"
#include "ns3/random-variable.h"
#include "ns3/node.h"
#include <map>
namespace ns3 {
@@ -495,14 +494,15 @@ public:
virtual ~MatrixPropagationLossModel ();
/**
* \brief Set loss (in dB, positive) between pair of nodes.
* \brief Set loss (in dB, positive) between pair of ns-3 objects
* (typically, nodes).
*
* \param a Source node
* \param b Destination node
* \param a Source object
* \param b Destination object
* \param loss a -> b path loss, positive in dB
* \param symmetric If true (default), both a->b and b->a paths will be affected
*/
void SetLoss (Ptr<Node> a, Ptr<Node> b, double loss, bool symmetric = true);
void SetLoss (Ptr<Object> a, Ptr<Object> b, double loss, bool symmetric = true);
/// Set default loss (in dB, positive) to be used, infinity if not set
void SetDefaultLoss (double);