A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::PbbAddressTlvBlock Class Reference

A block of Address TLVs (PbbAddressTlv). More...

#include <packetbb.h>

+ Collaboration diagram for ns3::PbbAddressTlvBlock:

Public Types

typedef std::list< Ptr
< PbbAddressTlv >
>::const_iterator 
ConstIterator
typedef std::list< Ptr
< PbbAddressTlv > >::iterator 
Iterator

Public Member Functions

 PbbAddressTlvBlock (void)
 ~PbbAddressTlvBlock (void)
Ptr< PbbAddressTlvBack (void) const
Iterator Begin (void)
ConstIterator Begin (void) const
void Clear (void)
 Removes all Address TLVs from this block.
void Deserialize (Buffer::Iterator &start)
 Deserializes a block from the specified buffer.
bool Empty (void) const
Iterator End (void)
ConstIterator End (void) const
Iterator Erase (Iterator position)
 Removes the Address TLV at the specified position.
Iterator Erase (Iterator first, Iterator last)
 Removes all Address TLVs from [first, last) (includes first, not includes last).
Ptr< PbbAddressTlvFront (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.
bool operator!= (const PbbAddressTlvBlock &other) const
bool operator== (const PbbAddressTlvBlock &other) const
void PopBack (void)
 Removes an Address TLV from the back of this block.
void PopFront (void)
 Removes an AddressTLV from the front of this block.
void Print (std::ostream &os) const
 Pretty-prints the contents of this block.
void Print (std::ostream &os, int level) const
 Pretty-prints the contents of this block, with specified indentation.
void PushBack (Ptr< PbbAddressTlv > tlv)
 Appends an Address TLV to the back of this block.
void PushFront (Ptr< PbbAddressTlv > tlv)
 Prepends an Address TLV to the front of this block.
void Serialize (Buffer::Iterator &start) const
 Serializes this block into the specified buffer.
int Size (void) const

Private Attributes

std::list< Ptr< PbbAddressTlv > > m_tlvList

Detailed Description

A block of Address TLVs (PbbAddressTlv).

Acts similar to a C++ STL container.

Definition at line 207 of file packetbb.h.

Member Typedef Documentation

Definition at line 211 of file packetbb.h.

Definition at line 210 of file packetbb.h.

Constructor & Destructor Documentation

ns3::PbbAddressTlvBlock::PbbAddressTlvBlock ( void  )

Definition at line 279 of file packetbb.cc.

ns3::PbbAddressTlvBlock::~PbbAddressTlvBlock ( void  )

Definition at line 284 of file packetbb.cc.

References Clear().

+ Here is the call graph for this function:

Member Function Documentation

Ptr< PbbAddressTlv > ns3::PbbAddressTlvBlock::Back ( void  ) const
Returns
the last AddressTLV in this block.

Definition at line 332 of file packetbb.cc.

References m_tlvList.

Referenced by ns3::PbbAddressBlock::TlvBack().

+ Here is the caller graph for this function:

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Begin ( void  )
Returns
an iterator to the first Address TLV in this block.

Definition at line 290 of file packetbb.cc.

References m_tlvList.

Referenced by Clear(), GetSerializedSize(), operator==(), Print(), Serialize(), and ns3::PbbAddressBlock::TlvBegin().

+ Here is the caller graph for this function:

PbbAddressTlvBlock::ConstIterator ns3::PbbAddressTlvBlock::Begin ( void  ) const
Returns
a const iterator to the first Address TLV in this block.

Definition at line 296 of file packetbb.cc.

References m_tlvList.

void ns3::PbbAddressTlvBlock::Clear ( void  )

Removes all Address TLVs from this block.

Definition at line 380 of file packetbb.cc.

References Begin(), End(), and m_tlvList.

Referenced by ns3::PbbAddressBlock::TlvClear(), and ~PbbAddressTlvBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::PbbAddressTlvBlock::Deserialize ( Buffer::Iterator start)

Deserializes a block from the specified buffer.

Parameters
starta 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 424 of file packetbb.cc.

References ns3::PbbTlv::Deserialize(), ns3::Buffer::Iterator::GetDistanceFrom(), PushBack(), ns3::Buffer::Iterator::ReadNtohU16(), and visualizer.core::start().

Referenced by ns3::PbbAddressBlock::Deserialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::PbbAddressTlvBlock::Empty ( void  ) const
Returns
true if there are no Address TLVs in this block, false otherwise.

Definition at line 320 of file packetbb.cc.

References m_tlvList.

Referenced by Serialize(), and ns3::PbbAddressBlock::TlvEmpty().

+ Here is the caller graph for this function:

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::End ( void  )
Returns
an iterator to the past-the-end element in this block.

Definition at line 302 of file packetbb.cc.

References m_tlvList.

Referenced by Clear(), GetSerializedSize(), operator==(), Print(), Serialize(), and ns3::PbbAddressBlock::TlvEnd().

+ Here is the caller graph for this function:

PbbAddressTlvBlock::ConstIterator ns3::PbbAddressTlvBlock::End ( void  ) const
Returns
a const iterator to the past-the-end element in this block.

Definition at line 308 of file packetbb.cc.

References m_tlvList.

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Erase ( PbbAddressTlvBlock::Iterator  position)

Removes the Address TLV at the specified position.

Parameters
positionan Iterator pointing to the Address TLV to erase.
Returns
an iterator pointing to the next Address TLV in the block.

Definition at line 368 of file packetbb.cc.

References m_tlvList.

Referenced by ns3::PbbAddressBlock::TlvErase().

+ Here is the caller graph for this function:

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Erase ( PbbAddressTlvBlock::Iterator  first,
PbbAddressTlvBlock::Iterator  last 
)

Removes all Address TLVs from [first, last) (includes first, not includes last).

Parameters
firstan Iterator pointing to the first Address TLV to erase (inclusive).
lastan Iterator pointing to the element past the last Address TLV to erase.
Returns
an iterator pointing to the next Address TLV in the block.

Definition at line 374 of file packetbb.cc.

References m_tlvList.

Ptr< PbbAddressTlv > ns3::PbbAddressTlvBlock::Front ( void  ) const
Returns
the first Address TLV in this block.

Definition at line 326 of file packetbb.cc.

References m_tlvList.

Referenced by ns3::PbbAddressBlock::TlvFront().

+ Here is the caller graph for this function:

uint32_t ns3::PbbAddressTlvBlock::GetSerializedSize ( void  ) const
Returns
The size (in bytes) needed to serialize this block.

Definition at line 390 of file packetbb.cc.

References Begin(), and End().

Referenced by ns3::PbbAddressBlock::GetSerializedSize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Insert ( PbbAddressTlvBlock::Iterator  position,
const Ptr< PbbAddressTlv tlv 
)

Inserts an Address TLV at the specified position in this block.

Parameters
positionan Iterator pointing to the position in this block to insert the Address TLV.
tlva smart pointer to the Address TLV to insert.
Returns
An iterator pointing to the newly inserted Address TLV.

Definition at line 362 of file packetbb.cc.

References m_tlvList.

bool ns3::PbbAddressTlvBlock::operator!= ( const PbbAddressTlvBlock other) const

Definition at line 490 of file packetbb.cc.

bool ns3::PbbAddressTlvBlock::operator== ( const PbbAddressTlvBlock other) const

Definition at line 469 of file packetbb.cc.

References Begin(), End(), and Size().

+ Here is the call graph for this function:

void ns3::PbbAddressTlvBlock::PopBack ( void  )

Removes an Address TLV from the back of this block.

Definition at line 356 of file packetbb.cc.

References m_tlvList.

Referenced by ns3::PbbAddressBlock::TlvPopBack().

+ Here is the caller graph for this function:

void ns3::PbbAddressTlvBlock::PopFront ( void  )

Removes an AddressTLV from the front of this block.

Definition at line 344 of file packetbb.cc.

References m_tlvList.

Referenced by ns3::PbbAddressBlock::TlvPopFront().

+ Here is the caller graph for this function:

void ns3::PbbAddressTlvBlock::Print ( std::ostream &  os) const

Pretty-prints the contents of this block.

Parameters
osa stream object to print to.

Definition at line 441 of file packetbb.cc.

Referenced by ns3::PbbAddressBlock::Print().

+ Here is the caller graph for this function:

void ns3::PbbAddressTlvBlock::Print ( std::ostream &  os,
int  level 
) const

Pretty-prints the contents of this block, with specified indentation.

Parameters
osa stream object to print to.
levellevel of indentation.

This probably never needs to be called by users. This is used when recursively printing sub-objects.

Definition at line 447 of file packetbb.cc.

References Begin(), End(), and Size().

+ Here is the call graph for this function:

void ns3::PbbAddressTlvBlock::PushBack ( Ptr< PbbAddressTlv tlv)

Appends an Address TLV to the back of this block.

Parameters
tlva smart pointer to the Address TLV to append.

Definition at line 350 of file packetbb.cc.

References m_tlvList.

Referenced by Deserialize(), and ns3::PbbAddressBlock::TlvPushBack().

+ Here is the caller graph for this function:

void ns3::PbbAddressTlvBlock::PushFront ( Ptr< PbbAddressTlv tlv)

Prepends an Address TLV to the front of this block.

Parameters
tlva smart pointer to the Address TLV to prepend.

Definition at line 338 of file packetbb.cc.

References m_tlvList.

Referenced by ns3::PbbAddressBlock::TlvPushFront().

+ Here is the caller graph for this function:

void ns3::PbbAddressTlvBlock::Serialize ( Buffer::Iterator start) const

Serializes this block into the specified buffer.

Parameters
starta 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 402 of file packetbb.cc.

References Begin(), Empty(), End(), ns3::Buffer::Iterator::GetDistanceFrom(), ns3::Buffer::Iterator::Next(), visualizer.core::start(), and ns3::Buffer::Iterator::WriteHtonU16().

Referenced by ns3::PbbAddressBlock::Serialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ns3::PbbAddressTlvBlock::Size ( void  ) const
Returns
the number of Address TLVs in this block.

Definition at line 314 of file packetbb.cc.

References m_tlvList.

Referenced by operator==(), Print(), and ns3::PbbAddressBlock::TlvSize().

+ Here is the caller graph for this function:

Member Data Documentation

std::list< Ptr<PbbAddressTlv> > ns3::PbbAddressTlvBlock::m_tlvList
private

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