src/helper/net-device-container.h
author Craig Dowell <craigdo@ee.washington.edu>
Fri, 21 Mar 2008 17:26:01 -0700
changeset 2711 83addb15f632
parent 2603 1308da4cb3bf
child 2698 4074ec514771
permissions -rw-r--r--
ip helper and find ip interface for device method on ipv4

#ifndef NET_DEVICE_CONTAINER_H
#define NET_DEVICE_CONTAINER_H

#include <stdint.h>
#include <vector>
#include "ns3/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 */