ndn-cxx: NDN C++ Library 0.9.0-33-g832ea91d
Loading...
Searching...
No Matches
ndn::PacketBase Class Reference

Base class to allow simple management of common packet tags. More...

#include <ndn-cxx/detail/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.
 
template<typename T >
std::shared_ptr< T > getTag () const
 Get a tag item.
 
template<typename T >
void removeTag () const
 Remove a tag item.
 
void setCongestionMark (uint64_t mark)
 Set the CongestionMark tag to the specified value.
 
template<typename T >
void setTag (std::shared_ptr< T > tag) const
 Set (add or replace) a tag item.
 

Detailed Description

Base class to allow simple management of common packet tags.

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

Member Function Documentation

◆ getCongestionMark()

uint64_t ndn::PacketBase::getCongestionMark ( ) const

Get the value of the CongestionMark tag.

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

◆ getTag()

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

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 72 of file tag-host.hpp.

◆ removeTag()

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

Remove a tag item.

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

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

◆ setCongestionMark()

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

Set the CongestionMark tag to the specified value.

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

◆ setTag()

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

Set (add or replace) 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 84 of file tag-host.hpp.