move helpers to their own dir.
--HG-- rename : src/devices/csma/csma-helper.cc => src/helper/csma-helper.cc rename : src/devices/csma/csma-helper.h => src/helper/csma-helper.h rename : src/mobility/mobility-helper.cc => src/helper/mobility-helper.cc rename : src/mobility/mobility-helper.h => src/helper/mobility-helper.h rename : src/node/net-device-container.cc => src/helper/net-device-container.cc rename : src/node/net-device-container.h => src/helper/net-device-container.h rename : src/node/node-container.cc => src/helper/node-container.cc rename : src/node/node-container.h => src/helper/node-container.h rename : src/routing/olsr/olsr-helper.cc => src/helper/olsr-helper.cc rename : src/routing/olsr/olsr-helper.h => src/helper/olsr-helper.h rename : src/devices/point-to-point/point-to-point-helper.cc => src/helper/point-to-point-helper.cc rename : src/devices/point-to-point/point-to-point-helper.h => src/helper/point-to-point-helper.h rename : src/devices/wifi/wifi-helper.cc => src/helper/wifi-helper.cc rename : src/devices/wifi/wifi-helper.h => src/helper/wifi-helper.h
This commit is contained in:
1 parent
e716bbe09d
commit
6fc019ef83
20 files changed
+91
-48
No files matched your search
@@ -1,40 +0,0 @@
|
||||
#include "net-device-container.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NetDeviceContainer::Iterator
|
||||
NetDeviceContainer::Begin (void) const
|
||||
{
|
||||
return m_nodes.begin ();
|
||||
}
|
||||
NetDeviceContainer::Iterator
|
||||
NetDeviceContainer::End (void) const
|
||||
{
|
||||
return m_nodes.end ();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
NetDeviceContainer::GetN (void) const
|
||||
{
|
||||
return m_nodes.size ();
|
||||
}
|
||||
Ptr<NetDevice>
|
||||
NetDeviceContainer::Get (uint32_t i) const
|
||||
{
|
||||
return m_nodes[i];
|
||||
}
|
||||
void
|
||||
NetDeviceContainer::Add (NetDeviceContainer other)
|
||||
{
|
||||
for (Iterator i = other.Begin (); i != other.End (); i++)
|
||||
{
|
||||
m_nodes.push_back (*i);
|
||||
}
|
||||
}
|
||||
void
|
||||
NetDeviceContainer::Add (Ptr<NetDevice> node)
|
||||
{
|
||||
m_nodes.push_back (node);
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
@@ -1,31 +0,0 @@
|
||||
#ifndef NET_DEVICE_CONTAINER_H
|
||||
#define NET_DEVICE_CONTAINER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
#include "net-device.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class NetDeviceContainer
|
||||
{
|
||||
public:
|
||||
typedef std::vector<Ptr<NetDevice> >::const_iterator Iterator;
|
||||
|
||||
Iterator Begin (void) const;
|
||||
Iterator End (void) const;
|
||||
|
||||
uint32_t GetN (void) const;
|
||||
Ptr<NetDevice> Get (uint32_t i) const;
|
||||
|
||||
void Create (uint32_t n);
|
||||
void Add (NetDeviceContainer other);
|
||||
void Add (Ptr<NetDevice> node);
|
||||
|
||||
private:
|
||||
std::vector<Ptr<NetDevice> > m_nodes;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* NET_DEVICE_CONTAINER_H */
|
||||
@@ -1,61 +0,0 @@
|
||||
#include "node-container.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NodeContainer::NodeContainer ()
|
||||
{}
|
||||
|
||||
NodeContainer::NodeContainer (Ptr<Node> node)
|
||||
{
|
||||
m_nodes.push_back (node);
|
||||
}
|
||||
NodeContainer::NodeContainer (const NodeContainer &a, const NodeContainer &b)
|
||||
{
|
||||
Add (a);
|
||||
Add (b);
|
||||
}
|
||||
|
||||
NodeContainer::Iterator
|
||||
NodeContainer::Begin (void) const
|
||||
{
|
||||
return m_nodes.begin ();
|
||||
}
|
||||
NodeContainer::Iterator
|
||||
NodeContainer::End (void) const
|
||||
{
|
||||
return m_nodes.end ();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
NodeContainer::GetN (void) const
|
||||
{
|
||||
return m_nodes.size ();
|
||||
}
|
||||
Ptr<Node>
|
||||
NodeContainer::Get (uint32_t i) const
|
||||
{
|
||||
return m_nodes[i];
|
||||
}
|
||||
void
|
||||
NodeContainer::Create (uint32_t n)
|
||||
{
|
||||
for (uint32_t i = 0; i < n; i++)
|
||||
{
|
||||
m_nodes.push_back (CreateObject<Node> ());
|
||||
}
|
||||
}
|
||||
void
|
||||
NodeContainer::Add (NodeContainer other)
|
||||
{
|
||||
for (Iterator i = other.Begin (); i != other.End (); i++)
|
||||
{
|
||||
m_nodes.push_back (*i);
|
||||
}
|
||||
}
|
||||
void
|
||||
NodeContainer::Add (Ptr<Node> node)
|
||||
{
|
||||
m_nodes.push_back (node);
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
@@ -1,35 +0,0 @@
|
||||
#ifndef NODE_CONTAINER_H
|
||||
#define NODE_CONTAINER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
#include "node.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class NodeContainer
|
||||
{
|
||||
public:
|
||||
typedef std::vector<Ptr<Node> >::const_iterator Iterator;
|
||||
|
||||
NodeContainer ();
|
||||
NodeContainer (Ptr<Node> node);
|
||||
NodeContainer (const NodeContainer &a, const NodeContainer &b);
|
||||
|
||||
Iterator Begin (void) const;
|
||||
Iterator End (void) const;
|
||||
|
||||
uint32_t GetN (void) const;
|
||||
Ptr<Node> Get (uint32_t i) const;
|
||||
|
||||
void Create (uint32_t n);
|
||||
void Add (NodeContainer other);
|
||||
void Add (Ptr<Node> node);
|
||||
|
||||
private:
|
||||
std::vector<Ptr<Node> > m_nodes;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* NODE_CONTAINER_H */
|
||||
@@ -28,8 +28,6 @@ def build(bld):
|
||||
'tcp.cc',
|
||||
'ipv4.cc',
|
||||
'application.cc',
|
||||
'node-container.cc',
|
||||
'net-device-container.cc',
|
||||
]
|
||||
|
||||
headers = bld.create_obj('ns3header')
|
||||
@@ -58,6 +56,4 @@ def build(bld):
|
||||
'tcp.h',
|
||||
'ipv4.h',
|
||||
'application.h',
|
||||
'node-container.h',
|
||||
'net-device-container.h',
|
||||
]
|
||||
Reference in new issue
Block a user