move Position class in own header

This commit is contained in:
Mathieu Lacage
2007-07-18 11:03:01 +02:00
parent a011792fb6
commit 5cc787f648
4 changed files with 30 additions and 16 deletions

View File

@@ -26,13 +26,6 @@ namespace ns3 {
const InterfaceId MobilityModel::iid = MakeInterfaceId ("MobilityModel", Object::iid);
Position::Position (double _x, double _y, double _z)
: x (_x),
y (_y),
z (_z)
{}
MobilityModel::MobilityModel ()
{
SetInterfaceId (MobilityModel::iid);

View File

@@ -22,18 +22,10 @@
#define MOBILITY_MODEL_H
#include "ns3/object.h"
#include "position.h"
namespace ns3 {
class Position
{
public:
Position (double x, double y, double z);
double x;
double y;
double z;
};
/**
* \brief keep track of the current position of an object
*

12
src/node/position.cc Normal file
View File

@@ -0,0 +1,12 @@
#include "position.h"
namespace ns3 {
Position::Position (double _x, double _y, double _z)
: x (_x),
y (_y),
z (_z)
{}
} // namespace ns3

17
src/node/position.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef POSITION_H
#define POSITION_H
namespace ns3 {
class Position
{
public:
Position (double x, double y, double z);
double x;
double y;
double z;
};
} // namespace ns3
#endif /* POSITION_H */