22 #ifndef NDN_DETAIL_TAG_HOST_HPP 23 #define NDN_DETAIL_TAG_HOST_HPP 51 setTag(shared_ptr<T> tag)
const;
61 mutable std::map<int, shared_ptr<Tag>> m_tags;
68 static_assert(std::is_base_of<Tag, T>::value,
"T must inherit from Tag");
70 auto it = m_tags.find(T::getTypeId());
71 if (it == m_tags.end()) {
74 return static_pointer_cast<T>(it->second);
81 static_assert(std::is_base_of<Tag, T>::value,
"T must inherit from Tag");
84 m_tags.erase(T::getTypeId());
100 #endif // NDN_DETAIL_TAG_HOST_HPP
void removeTag() const
remove tag item
Base class to store tag information (e.g., inside Interest and Data packets)
void setTag(shared_ptr< T > tag) const
set a tag item
import common constructs for ndn-cxx library internal use
shared_ptr< T > getTag() const
get a tag item