A block of Address TLVs (PbbAddressTlv). More...
#include "packetbb.h"
Public Types | |
typedef std::list< Ptr< PbbAddressTlv > >::const_iterator | ConstIterator |
PbbAddressTlv const iterator for PbbAddressTlvBlock. More... | |
typedef std::list< Ptr< PbbAddressTlv > >::iterator | Iterator |
PbbAddressTlv iterator for PbbAddressTlvBlock. More... | |
Public Member Functions | |
PbbAddressTlvBlock (void) | |
~PbbAddressTlvBlock (void) | |
Ptr< PbbAddressTlv > | Back (void) const |
Iterator | Begin (void) |
ConstIterator | Begin (void) const |
void | Clear (void) |
Removes all Address TLVs from this block. More... | |
void | Deserialize (Buffer::Iterator &start) |
Deserializes a block from the specified buffer. More... | |
bool | Empty (void) const |
Iterator | End (void) |
ConstIterator | End (void) const |
Iterator | Erase (Iterator position) |
Removes the Address TLV at the specified position. More... | |
Iterator | Erase (Iterator first, Iterator last) |
Removes all Address TLVs from [first, last) (includes first, not includes last). More... | |
Ptr< PbbAddressTlv > | Front (void) const |
uint32_t | GetSerializedSize (void) const |
Iterator | Insert (Iterator position, const Ptr< PbbAddressTlv > tlv) |
Inserts an Address TLV at the specified position in this block. More... | |
bool | operator!= (const PbbAddressTlvBlock &other) const |
Inequality operator for PbbAddressTlvBlock. More... | |
bool | operator== (const PbbAddressTlvBlock &other) const |
Equality operator for PbbAddressTlvBlock. More... | |
void | PopBack (void) |
Removes an Address TLV from the back of this block. More... | |
void | PopFront (void) |
Removes an AddressTLV from the front of this block. More... | |
void | Print (std::ostream &os) const |
Pretty-prints the contents of this block. More... | |
void | Print (std::ostream &os, int level) const |
Pretty-prints the contents of this block, with specified indentation. More... | |
void | PushBack (Ptr< PbbAddressTlv > tlv) |
Appends an Address TLV to the back of this block. More... | |
void | PushFront (Ptr< PbbAddressTlv > tlv) |
Prepends an Address TLV to the front of this block. More... | |
void | Serialize (Buffer::Iterator &start) const |
Serializes this block into the specified buffer. More... | |
int | Size (void) const |
Private Attributes | |
std::list< Ptr< PbbAddressTlv > > | m_tlvList |
PbbAddressTlv container. More... | |
A block of Address TLVs (PbbAddressTlv).
Acts similar to a C++ STL container.
Definition at line 219 of file packetbb.h.
typedef std::list< Ptr<PbbAddressTlv> >::const_iterator ns3::PbbAddressTlvBlock::ConstIterator |
PbbAddressTlv const iterator for PbbAddressTlvBlock.
Definition at line 225 of file packetbb.h.
typedef std::list< Ptr<PbbAddressTlv> >::iterator ns3::PbbAddressTlvBlock::Iterator |
PbbAddressTlv iterator for PbbAddressTlvBlock.
Definition at line 223 of file packetbb.h.
ns3::PbbAddressTlvBlock::PbbAddressTlvBlock | ( | void | ) |
Definition at line 304 of file packetbb.cc.
References NS_LOG_FUNCTION.
ns3::PbbAddressTlvBlock::~PbbAddressTlvBlock | ( | void | ) |
Definition at line 310 of file packetbb.cc.
References Clear(), and NS_LOG_FUNCTION.
Ptr< PbbAddressTlv > ns3::PbbAddressTlvBlock::Back | ( | void | ) | const |
Definition at line 366 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::TlvBack().
PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Begin | ( | void | ) |
Definition at line 317 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by Clear(), GetSerializedSize(), operator==(), Print(), Serialize(), and ns3::PbbAddressBlock::TlvBegin().
PbbAddressTlvBlock::ConstIterator ns3::PbbAddressTlvBlock::Begin | ( | void | ) | const |
Definition at line 324 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
void ns3::PbbAddressTlvBlock::Clear | ( | void | ) |
Removes all Address TLVs from this block.
Definition at line 422 of file packetbb.cc.
References Begin(), End(), m_tlvList, and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::TlvClear(), and ~PbbAddressTlvBlock().
void ns3::PbbAddressTlvBlock::Deserialize | ( | Buffer::Iterator & | start | ) |
Deserializes a block from the specified buffer.
start | a reference to the point in a buffer to begin deserializing. |
Users should not need to call this. Blocks will be deserialized by their containing packet.
Definition at line 469 of file packetbb.cc.
References NS_LOG_FUNCTION, PushBack(), and visualizer.core::start().
Referenced by ns3::PbbAddressBlock::Deserialize().
bool ns3::PbbAddressTlvBlock::Empty | ( | void | ) | const |
Definition at line 352 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by Serialize(), and ns3::PbbAddressBlock::TlvEmpty().
PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::End | ( | void | ) |
Definition at line 331 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by Clear(), GetSerializedSize(), operator==(), Print(), Serialize(), and ns3::PbbAddressBlock::TlvEnd().
PbbAddressTlvBlock::ConstIterator ns3::PbbAddressTlvBlock::End | ( | void | ) | const |
Definition at line 338 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Erase | ( | PbbAddressTlvBlock::Iterator | position | ) |
Removes the Address TLV at the specified position.
position | an Iterator pointing to the Address TLV to erase. |
Definition at line 408 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::TlvErase().
PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Erase | ( | PbbAddressTlvBlock::Iterator | first, |
PbbAddressTlvBlock::Iterator | last | ||
) |
Removes all Address TLVs from [first, last) (includes first, not includes last).
first | an Iterator pointing to the first Address TLV to erase (inclusive). |
last | an Iterator pointing to the element past the last Address TLV to erase. |
Definition at line 415 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Ptr< PbbAddressTlv > ns3::PbbAddressTlvBlock::Front | ( | void | ) | const |
Definition at line 359 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::TlvFront().
uint32_t ns3::PbbAddressTlvBlock::GetSerializedSize | ( | void | ) | const |
Definition at line 433 of file packetbb.cc.
References Begin(), End(), and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::GetSerializedSize().
PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Insert | ( | PbbAddressTlvBlock::Iterator | position, |
const Ptr< PbbAddressTlv > | tlv | ||
) |
Inserts an Address TLV at the specified position in this block.
position | an Iterator pointing to the position in this block to insert the Address TLV. |
tlv | a smart pointer to the Address TLV to insert. |
Definition at line 401 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
bool ns3::PbbAddressTlvBlock::operator!= | ( | const PbbAddressTlvBlock & | other | ) | const |
Inequality operator for PbbAddressTlvBlock.
other | PbbAddressTlvBlock to compare to this one |
Definition at line 538 of file packetbb.cc.
bool ns3::PbbAddressTlvBlock::operator== | ( | const PbbAddressTlvBlock & | other | ) | const |
Equality operator for PbbAddressTlvBlock.
other | PbbAddressTlvBlock to compare to this one |
Definition at line 517 of file packetbb.cc.
void ns3::PbbAddressTlvBlock::PopBack | ( | void | ) |
Removes an Address TLV from the back of this block.
Definition at line 394 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::TlvPopBack().
void ns3::PbbAddressTlvBlock::PopFront | ( | void | ) |
Removes an AddressTLV from the front of this block.
Definition at line 380 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::TlvPopFront().
void ns3::PbbAddressTlvBlock::Print | ( | std::ostream & | os | ) | const |
Pretty-prints the contents of this block.
os | a stream object to print to. |
Definition at line 487 of file packetbb.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::Print().
void ns3::PbbAddressTlvBlock::Print | ( | std::ostream & | os, |
int | level | ||
) | const |
Pretty-prints the contents of this block, with specified indentation.
os | a stream object to print to. |
level | level of indentation. |
This probably never needs to be called by users. This is used when recursively printing sub-objects.
Definition at line 494 of file packetbb.cc.
References Begin(), End(), NS_LOG_FUNCTION, and Size().
void ns3::PbbAddressTlvBlock::PushBack | ( | Ptr< PbbAddressTlv > | tlv | ) |
Appends an Address TLV to the back of this block.
tlv | a smart pointer to the Address TLV to append. |
Definition at line 387 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by Deserialize(), and ns3::PbbAddressBlock::TlvPushBack().
void ns3::PbbAddressTlvBlock::PushFront | ( | Ptr< PbbAddressTlv > | tlv | ) |
Prepends an Address TLV to the front of this block.
tlv | a smart pointer to the Address TLV to prepend. |
Definition at line 373 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by ns3::PbbAddressBlock::TlvPushFront().
void ns3::PbbAddressTlvBlock::Serialize | ( | Buffer::Iterator & | start | ) | const |
Serializes this block into the specified buffer.
start | a reference to the point in a buffer to begin serializing. |
Users should not need to call this. Blocks will be serialized by their containing packet.
Definition at line 446 of file packetbb.cc.
References Begin(), Empty(), End(), NS_LOG_FUNCTION, visualizer.core::start(), and ns3::Buffer::Iterator::WriteHtonU16().
Referenced by ns3::PbbAddressBlock::Serialize().
int ns3::PbbAddressTlvBlock::Size | ( | void | ) | const |
Definition at line 345 of file packetbb.cc.
References m_tlvList, and NS_LOG_FUNCTION.
Referenced by operator==(), Print(), and ns3::PbbAddressBlock::TlvSize().
|
private |
PbbAddressTlv container.
Definition at line 378 of file packetbb.h.
Referenced by Back(), Begin(), Clear(), Empty(), End(), Erase(), Front(), Insert(), PopBack(), PopFront(), PushBack(), PushFront(), and Size().