ndn::TagHost Class Reference

Base class to store tag information, e.g., inside Interest and Data packets. More...

#include <ndn-cxx/detail/tag-host.hpp>

+ Inheritance diagram for ndn::TagHost:

Public Member Functions

template<typename T >
shared_ptr< T > getTag () const
 Get a tag item. More...
 
template<typename T >
void removeTag () const
 Remove a tag item. More...
 
template<typename T >
void setTag (shared_ptr< T > tag) const
 Set (add or replace) a tag item. More...
 

Detailed Description

Base class to store tag information, e.g., inside Interest and Data packets.

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

Member Function Documentation

◆ getTag()

template<typename T >
shared_ptr< T > ndn::TagHost::getTag

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.

◆ removeTag()

template<typename T >
void ndn::TagHost::removeTag

Remove a tag item.

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

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

◆ setTag()

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

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