Public Member Functions

ns3::NetDeviceContainer Class Reference

holds a vector of ns3::NetDevice pointers More...

#include <net-device-container.h>

List of all members.

Public Member Functions

 NetDeviceContainer ()
 NetDeviceContainer (Ptr< NetDevice > dev)
 NetDeviceContainer (const NetDeviceContainer &a, const NetDeviceContainer &b)
Iterator Begin (void) const
Iterator End (void) const
uint32_t GetN (void) const
Ptr< NetDeviceGet (uint32_t i) const
void Add (NetDeviceContainer other)
void Add (Ptr< NetDevice > device)

Detailed Description

holds a vector of ns3::NetDevice pointers


Constructor & Destructor Documentation

ns3::NetDeviceContainer::NetDeviceContainer (  ) 

Create an empty NetDeviceContainer.

ns3::NetDeviceContainer::NetDeviceContainer ( Ptr< NetDevice dev  ) 
Parameters:
dev a device to add to the container

Create a NetDeviceContainer with exactly one device

ns3::NetDeviceContainer::NetDeviceContainer ( const NetDeviceContainer a,
const NetDeviceContainer b 
)
Parameters:
a a device container
b another device container

Create a device container which is a concatenation of the two input NetDeviceContainers.

Note:
A frequently seen idiom that uses these constructors involves the implicit conversion by constructor of Ptr<NetDevice>. When used, two Ptr<NetDevice> will be passed to this constructor instead of NetDeviceContainer&. C++ will notice the implicit conversion path that goes through the NetDeviceContainer (Ptr<NetDevice> dev) constructor above. Using this conversion one may provide optionally provide arguments of Ptr<NetDevice> to these constructors.

Member Function Documentation

void ns3::NetDeviceContainer::Add ( NetDeviceContainer  other  ) 
Parameters:
other another netdevice container

Append to the end of this container the other input container.

void ns3::NetDeviceContainer::Add ( Ptr< NetDevice device  ) 
Parameters:
device another netdevice pointer.

Append to the end of this container the input netdevice pointer.

Iterator ns3::NetDeviceContainer::Begin ( void   )  const
Returns:
an iterator which points to the start of the array of pointers.
Iterator ns3::NetDeviceContainer::End ( void   )  const
Returns:
an iterator which points to the end of the array of pointers.
Ptr<NetDevice> ns3::NetDeviceContainer::Get ( uint32_t  i  )  const
Parameters:
i the index of the requested netdevice pointer.
Returns:
the requested netdevice pointer.
uint32_t ns3::NetDeviceContainer::GetN ( void   )  const
Returns:
the number of netdevice pointers stored in this container.

The documentation for this class was generated from the following file: