ns3::PbbTlvBlock Class Reference
A block of packet or message TLVs (PbbTlv).
More...
#include <packetbb.h>
List of all members.
Public Types |
typedef std::list< Ptr< PbbTlv >
>::iterator | Iterator |
typedef std::list< Ptr< PbbTlv >
>::const_iterator | ConstIterator |
Public Member Functions |
Iterator | Begin (void) |
ConstIterator | Begin (void) const |
Iterator | End (void) |
ConstIterator | End (void) const |
int | Size (void) const |
bool | Empty (void) const |
Ptr< PbbTlv > | Front (void) const |
Ptr< PbbTlv > | Back (void) const |
void | PushFront (Ptr< PbbTlv > tlv) |
| Prepends a TLV to the front of this block.
|
void | PopFront (void) |
| Removes a TLV from the front of this block.
|
void | PushBack (Ptr< PbbTlv > tlv) |
| Appends a TLV to the back of this block.
|
void | PopBack (void) |
| Removes a TLV from the back of this block.
|
Iterator | Insert (Iterator position, const Ptr< PbbTlv > tlv) |
| Inserts a TLV at the specified position in this block.
|
Iterator | Erase (Iterator position) |
| Removes the TLV at the specified position.
|
Iterator | Erase (Iterator first, Iterator last) |
| Removes all TLVs from [first, last) (includes first, not includes last).
|
void | Clear (void) |
| Removes all TLVs from this block.
|
uint32_t | GetSerializedSize (void) const |
void | Serialize (Buffer::Iterator &start) const |
| Serializes this block into the specified buffer.
|
void | Deserialize (Buffer::Iterator &start) |
| Deserializes a block from the specified buffer.
|
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.
|
bool | operator== (const PbbTlvBlock &other) const |
bool | operator!= (const PbbTlvBlock &other) const |
Detailed Description
A block of packet or message TLVs (PbbTlv).
Acts similar to a C++ STL container. Should not be used for Address TLVs.
Member Function Documentation
Ptr<PbbTlv> ns3::PbbTlvBlock::Back |
( |
void |
|
) |
const |
- Returns:
- a smart pointer to the last TLV in this block.
ConstIterator ns3::PbbTlvBlock::Begin |
( |
void |
|
) |
const |
- Returns:
- a const iterator to the first TLV in this block.
Iterator ns3::PbbTlvBlock::Begin |
( |
void |
|
) |
|
- Returns:
- an iterator to the first TLV in this block.
Deserializes a block from the specified buffer.
- Parameters:
-
| 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.
bool ns3::PbbTlvBlock::Empty |
( |
void |
|
) |
const |
- Returns:
- true if there are no TLVs in this block, false otherwise.
ConstIterator ns3::PbbTlvBlock::End |
( |
void |
|
) |
const |
- Returns:
- a const iterator to the past-the-end element in this block.
Iterator ns3::PbbTlvBlock::End |
( |
void |
|
) |
|
- Returns:
- an iterator to the past-the-end element in this block.
Iterator ns3::PbbTlvBlock::Erase |
( |
Iterator |
first, |
|
|
Iterator |
last | |
|
) |
| | |
Removes all TLVs from [first, last) (includes first, not includes last).
- Parameters:
-
| first | an Iterator pointing to the first TLV to erase (inclusive). |
| last | an Iterator pointing to the element past the last TLV to erase. |
- Returns:
- an iterator pointing to the next TLV in the block.
Iterator ns3::PbbTlvBlock::Erase |
( |
Iterator |
position |
) |
|
Removes the TLV at the specified position.
- Parameters:
-
| position | an Iterator pointing to the TLV to erase. |
- Returns:
- an iterator pointing to the next TLV in the block.
Ptr<PbbTlv> ns3::PbbTlvBlock::Front |
( |
void |
|
) |
const |
- Returns:
- a smart pointer to the first TLV in this block.
uint32_t ns3::PbbTlvBlock::GetSerializedSize |
( |
void |
|
) |
const |
- Returns:
- The size (in bytes) needed to serialize this block.
Iterator ns3::PbbTlvBlock::Insert |
( |
Iterator |
position, |
|
|
const Ptr< PbbTlv > |
tlv | |
|
) |
| | |
Inserts a TLV at the specified position in this block.
- Parameters:
-
| position | an Iterator pointing to the position in this block to insert the TLV. |
| tlv | a smart pointer to the TLV to insert. |
- Returns:
- An iterator pointing to the newly inserted TLV.
void ns3::PbbTlvBlock::Print |
( |
std::ostream & |
os, |
|
|
int |
level | |
|
) |
| | const |
Pretty-prints the contents of this block, with specified indentation.
- Parameters:
-
| 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.
void ns3::PbbTlvBlock::Print |
( |
std::ostream & |
os |
) |
const |
Pretty-prints the contents of this block.
- Parameters:
-
| os | a stream object to print to. |
void ns3::PbbTlvBlock::PushBack |
( |
Ptr< PbbTlv > |
tlv |
) |
|
Appends a TLV to the back of this block.
- Parameters:
-
| tlv | a smart pointer to the TLV to append. |
void ns3::PbbTlvBlock::PushFront |
( |
Ptr< PbbTlv > |
tlv |
) |
|
Prepends a TLV to the front of this block.
- Parameters:
-
| tlv | a smart pointer to the TLV to prepend. |
Serializes this block into the specified buffer.
- Parameters:
-
| 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.
int ns3::PbbTlvBlock::Size |
( |
void |
|
) |
const |
- Returns:
- the number of TLVs in this block.
The documentation for this class was generated from the following file: