A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::PacketTagIterator Class Reference

Iterator over the set of packet tags in a packet. More...

#include "packet.h"

+ Collaboration diagram for ns3::PacketTagIterator:

Classes

class  Item
 Identifies a packet tag within a packet. More...
 

Public Member Functions

bool HasNext () const
 
Item Next ()
 

Private Member Functions

 PacketTagIterator (const PacketTagList::TagData *head)
 Constructor.
 

Private Attributes

const PacketTagList::TagDatam_current
 actual position over the set of tags in a packet
 

Friends

class Packet
 Friend class.
 

Detailed Description

Iterator over the set of packet tags in a packet.

This is a java-style iterator.

Definition at line 124 of file packet.h.

Constructor & Destructor Documentation

◆ PacketTagIterator()

ns3::PacketTagIterator::PacketTagIterator ( const PacketTagList::TagData * head)
private

Constructor.

Parameters
headhead of the items

Definition at line 81 of file packet.cc.

Member Function Documentation

◆ HasNext()

bool ns3::PacketTagIterator::HasNext ( ) const
Returns
true if calling Next is safe, false otherwise.

Definition at line 87 of file packet.cc.

References m_current.

Referenced by Next(), and ns3::Packet::PrintPacketTags().

+ Here is the caller graph for this function:

◆ Next()

PacketTagIterator::Item ns3::PacketTagIterator::Next ( )
Returns
the next item found and prepare for the next one.

Definition at line 93 of file packet.cc.

References HasNext(), m_current, ns3::PacketTagList::TagData::next, NS_ASSERT, and prev.

Referenced by ns3::Packet::PrintPacketTags().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ Packet

friend class Packet
friend

Friend class.

Definition at line 169 of file packet.h.

Referenced by ns3::Packet::Copy().

Member Data Documentation

◆ m_current

const PacketTagList::TagData* ns3::PacketTagIterator::m_current
private

actual position over the set of tags in a packet

Definition at line 175 of file packet.h.

Referenced by HasNext(), and Next().


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