36 : m_prefixAnn(std::move(prefixAnn))
38 if (m_prefixAnn->getData() == nullopt) {
43 template<encoding::Tag TAG>
47 if (m_prefixAnn == nullopt) {
48 NDN_THROW(
Error(
"PrefixAnnouncementHeader does not contain a PrefixAnnouncement"));
52 length += m_prefixAnn->getData()->wireEncode(encoder);
53 length += encoder.prependVarNumber(length);
Represents a TLV element of the NDN packet format.
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
void parse() const
Parse TLV-VALUE into sub-elements.
const Block & get(uint32_t type) const
Return the first sub-element of the specified TLV-TYPE.
A prefix announcement object that represents an application's intent of registering a prefix toward i...
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)