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 () const |
Returns the offset from the start of the virtual byte buffer to the ByteTagList. | |
bool | HasNext () const |
Used to determine if the iterator is at the end of the byteTagList. | |
ByteTagList::Iterator::Item | Next () |
Returns the next Item from the ByteTagList. | |
Private Member Functions | |
Iterator (uint8_t *start, uint8_t *end, int32_t offsetStart, int32_t offsetEnd, int32_t adjustment) | |
Constructor. | |
void | PrepareForNext () |
Prepare the iterator for the next tag. | |
Private Attributes | |
int32_t | m_adjustment |
Adjustment to byte tag offsets. | |
uint8_t * | m_current |
Current tag. | |
uint8_t * | m_end |
End tag. | |
int32_t | m_nextEnd |
End of the next tag. | |
uint32_t | m_nextSize |
Size of the next tag. | |
int32_t | m_nextStart |
Start of the next tag. | |
uint32_t | m_nextTid |
TypeId of the next tag. | |
int32_t | m_offsetEnd |
Offset to the end of the tag from the virtual byte buffer. | |
int32_t | m_offsetStart |
Offset to the start of the tag from the virtual byte buffer. | |
Friends | |
class | ByteTagList |
Friend class. | |
An iterator for iterating through a byte tag list.
An iterator for iterating through a byte tag list
Definition at line 63 of file byte-tag-list.h.
|
private |
Constructor.
start | Starting tag |
end | End tag |
offsetStart | offset to the start of the tag from the virtual byte buffer |
offsetEnd | offset to the end of the tag from the virtual byte buffer |
adjustment | adjustment to byte tag offsets |
Definition at line 117 of file byte-tag-list.cc.
References NS_LOG_FUNCTION, and PrepareForNext().
uint32_t ns3::ByteTagList::Iterator::GetOffsetStart | ( | ) | const |
Returns the offset from the start of the virtual byte buffer to the ByteTagList.
Definition at line 133 of file byte-tag-list.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ByteTagIterator::Next().
bool ns3::ByteTagList::Iterator::HasNext | ( | ) | const |
Used to determine if the iterator is at the end of the byteTagList.
Definition at line 74 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::ByteTagList::GetSerializedSize(), ns3::ByteTagIterator::HasNext(), Next(), and ns3::ByteTagList::Serialize().
ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next | ( | ) |
Returns the next Item from the ByteTagList.
Definition at line 81 of file byte-tag-list.cc.
References ns3::ByteTagList::Iterator::Item::buf, ns3::ByteTagList::Iterator::Item::end, HasNext(), m_current, m_end, m_nextEnd, m_nextSize, m_nextStart, m_nextTid, m_offsetEnd, m_offsetStart, NS_ASSERT, PrepareForNext(), ns3::TypeId::SetUid(), ns3::ByteTagList::Iterator::Item::size, ns3::ByteTagList::Iterator::Item::start, ns3::ByteTagList::Iterator::Item::tid, and ns3::TagBuffer::TrimAtEnd().
Referenced by ns3::ByteTagList::Add(), ns3::ByteTagList::AddAtEnd(), ns3::ByteTagList::AddAtStart(), ns3::ByteTagList::GetSerializedSize(), ns3::ByteTagIterator::Next(), and ns3::ByteTagList::Serialize().
|
private |
Prepare the iterator for the next tag.
Definition at line 96 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().
|
friend |
Friend class.
Definition at line 114 of file byte-tag-list.h.
|
private |
Adjustment to byte tag offsets.
Definition at line 138 of file byte-tag-list.h.
Referenced by PrepareForNext().
|
private |
Current tag.
Definition at line 134 of file byte-tag-list.h.
Referenced by HasNext(), Next(), and PrepareForNext().
|
private |
End tag.
Definition at line 135 of file byte-tag-list.h.
Referenced by HasNext(), Next(), and PrepareForNext().
|
private |
End of the next tag.
Definition at line 142 of file byte-tag-list.h.
Referenced by Next(), and PrepareForNext().
|
private |
Size of the next tag.
Definition at line 140 of file byte-tag-list.h.
Referenced by Next(), and PrepareForNext().
|
private |
Start of the next tag.
Definition at line 141 of file byte-tag-list.h.
Referenced by Next(), and PrepareForNext().
|
private |
TypeId of the next tag.
Definition at line 139 of file byte-tag-list.h.
Referenced by Next(), and PrepareForNext().
|
private |
Offset to the end of the tag from the virtual byte buffer.
Definition at line 137 of file byte-tag-list.h.
Referenced by Next(), and PrepareForNext().
|
private |
Offset to the start of the tag from the virtual byte buffer.
Definition at line 136 of file byte-tag-list.h.
Referenced by Next(), and PrepareForNext().