ndn::PacketBase Class Reference

base class to allow simple management of packet tags More...

#include <packet-base.hpp>

+ Inheritance diagram for ndn::PacketBase:
+ Collaboration diagram for ndn::PacketBase:

Public Member Functions

uint64_t getCongestionMark () const
 get the value of the CongestionMark tag More...
 
template<typename T >
shared_ptr< T > getTag () const
 get a tag item More...
 
template<typename T >
void removeTag () const
 remove tag item More...
 
void setCongestionMark (uint64_t mark)
 set the CongestionMark tag to the specified value More...
 
template<typename T >
void setTag (shared_ptr< T > tag) const
 set a tag item More...
 

Detailed Description

base class to allow simple management of packet tags

Definition at line 31 of file packet-base.hpp.

Member Function Documentation

uint64_t ndn::PacketBase::getCongestionMark ( ) const

get the value of the CongestionMark tag

Definition at line 28 of file packet-base.cpp.

template<typename T >
shared_ptr< T > ndn::TagHost::getTag ( ) const
inlineinherited

get a tag item

Template Parameters
Ttype of the tag, which must be a subclass of ndn::Tag
Return values
nullptrif no Tag of type T is stored

Definition at line 67 of file tag-host.hpp.

template<typename T >
void ndn::TagHost::removeTag ( ) const
inlineinherited

remove tag item

Note
Tag can be removed even on a const tag host instance

Definition at line 94 of file tag-host.hpp.

void ndn::PacketBase::setCongestionMark ( uint64_t  mark)

set the CongestionMark tag to the specified value

Definition at line 41 of file packet-base.cpp.

template<typename T >
void ndn::TagHost::setTag ( shared_ptr< T >  tag) const
inlineinherited

set a tag item

Template Parameters
Ttype of the tag, which must be a subclass of ndn::Tag
Note
Tag can be set even on a const tag host instance

Definition at line 80 of file tag-host.hpp.