A Discrete-Event Network Simulator
API
ns3::ByteTagList::Iterator Class Reference

An iterator for iterating through a byte tag list. More...

#include "byte-tag-list.h"

Classes

struct  Item
 An item specifies an individual tag within a byte buffer. More...
 

Public Member Functions

uint32_t GetOffsetStart (void) const
 Returns the offset from the start of the virtual byte buffer to the ByteTagList. More...
 
bool HasNext (void) const
 Used to determine if the iterator is at the end of the byteTagList. More...
 
struct ByteTagList::Iterator::Item Next (void)
 Returns the next Item from the ByteTagList. More...
 

Private Member Functions

 Iterator (uint8_t *start, uint8_t *end, int32_t offsetStart, int32_t offsetEnd, int32_t adjustment)
 Constructor. More...
 
void PrepareForNext (void)
 Prepare the iterator for the next tag. More...
 

Private Attributes

int32_t m_adjustment
 Adjustment to byte tag offsets. More...
 
uint8_t * m_current
 Current tag. More...
 
uint8_t * m_end
 End tag. More...
 
int32_t m_nextEnd
 End of the next tag. More...
 
uint32_t m_nextSize
 Size of the next tag. More...
 
int32_t m_nextStart
 Start of the next tag. More...
 
uint32_t m_nextTid
 TypeId of the next tag. More...
 
int32_t m_offsetEnd
 Offset to the end of the tag from the virtual byte buffer. More...
 
int32_t m_offsetStart
 Offset to the start of the tag from the virtual byte buffer. More...
 

Friends

class ByteTagList
 

Detailed Description

An iterator for iterating through a byte tag list.

An iterator for iterating through a byte tag list

Definition at line 72 of file byte-tag-list.h.

Constructor & Destructor Documentation

ns3::ByteTagList::Iterator::Iterator ( uint8_t *  start,
uint8_t *  end,
int32_t  offsetStart,
int32_t  offsetEnd,
int32_t  adjustment 
)
private

Constructor.

Parameters
startStarting tag
endEnd tag
offsetStartoffset to the start of the tag from the virtual byte buffer
offsetEndoffset to the end of the tag from the virtual byte buffer
adjustmentadjustment to byte tag offsets

Definition at line 121 of file byte-tag-list.cc.

References NS_LOG_FUNCTION, and PrepareForNext().

+ Here is the call graph for this function:

Member Function Documentation

uint32_t ns3::ByteTagList::Iterator::GetOffsetStart ( void  ) const

Returns the offset from the start of the virtual byte buffer to the ByteTagList.

Returns
offset to the start of this ByteTagList

Definition at line 133 of file byte-tag-list.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::ByteTagIterator::Next().

+ Here is the caller graph for this function:

bool ns3::ByteTagList::Iterator::HasNext ( void  ) const

Used to determine if the iterator is at the end of the byteTagList.

Returns
true if there are more Items in the list

Definition at line 81 of file byte-tag-list.cc.

References m_current, m_end, and NS_LOG_FUNCTION.

Referenced by ns3::ByteTagList::Add(), ns3::ByteTagList::AddAtEnd(), ns3::ByteTagList::AddAtStart(), ns3::ByteTagIterator::HasNext(), and Next().

+ Here is the caller graph for this function:

void ns3::ByteTagList::Iterator::PrepareForNext ( void  )
private

Prepare the iterator for the next tag.

Definition at line 101 of file byte-tag-list.cc.

References m_adjustment, m_current, m_end, m_nextEnd, m_nextSize, m_nextStart, m_nextTid, m_offsetEnd, m_offsetStart, NS_LOG_FUNCTION, and ns3::TagBuffer::ReadU32().

Referenced by Iterator(), and Next().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class ByteTagList
friend

Definition at line 115 of file byte-tag-list.h.

Member Data Documentation

int32_t ns3::ByteTagList::Iterator::m_adjustment
private

Adjustment to byte tag offsets.

Definition at line 135 of file byte-tag-list.h.

Referenced by PrepareForNext().

uint8_t* ns3::ByteTagList::Iterator::m_current
private

Current tag.

Definition at line 131 of file byte-tag-list.h.

Referenced by HasNext(), Next(), and PrepareForNext().

uint8_t* ns3::ByteTagList::Iterator::m_end
private

End tag.

Definition at line 132 of file byte-tag-list.h.

Referenced by HasNext(), Next(), and PrepareForNext().

int32_t ns3::ByteTagList::Iterator::m_nextEnd
private

End of the next tag.

Definition at line 139 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

uint32_t ns3::ByteTagList::Iterator::m_nextSize
private

Size of the next tag.

Definition at line 137 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

int32_t ns3::ByteTagList::Iterator::m_nextStart
private

Start of the next tag.

Definition at line 138 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

uint32_t ns3::ByteTagList::Iterator::m_nextTid
private

TypeId of the next tag.

Definition at line 136 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

int32_t ns3::ByteTagList::Iterator::m_offsetEnd
private

Offset to the end of the tag from the virtual byte buffer.

Definition at line 134 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

int32_t ns3::ByteTagList::Iterator::m_offsetStart
private

Offset to the start of the tag from the virtual byte buffer.

Definition at line 133 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().


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