ndn::lp::PrefixAnnouncementHeader Class Reference

Represents a PrefixAnnouncement header field in NDNLP. More...

#include <ndn-cxx/lp/prefix-announcement-header.hpp>

Classes

class  Error
 

Public Member Functions

 PrefixAnnouncementHeader ()
 
 PrefixAnnouncementHeader (const Block &block)
 
 PrefixAnnouncementHeader (PrefixAnnouncement prefixAnn)
 Constructs PrefixAnnouncementHeader using PrefixAnnouncement. More...
 
const std::optional< PrefixAnnouncement > & getPrefixAnn () const
 
void wireDecode (const Block &wire)
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 Encodes the prefix announcement header to the wire format. More...
 

Detailed Description

Represents a PrefixAnnouncement header field in NDNLP.

Definition at line 31 of file prefix-announcement-header.hpp.

Constructor & Destructor Documentation

◆ PrefixAnnouncementHeader() [1/3]

ndn::lp::PrefixAnnouncementHeader::PrefixAnnouncementHeader ( )
default

◆ PrefixAnnouncementHeader() [2/3]

ndn::lp::PrefixAnnouncementHeader::PrefixAnnouncementHeader ( const Block block)
explicit

Definition at line 29 of file prefix-announcement-header.cpp.

◆ PrefixAnnouncementHeader() [3/3]

ndn::lp::PrefixAnnouncementHeader::PrefixAnnouncementHeader ( PrefixAnnouncement  prefixAnn)
explicit

Constructs PrefixAnnouncementHeader using PrefixAnnouncement.

Exceptions
ErrorPrefixAnnouncement does not contain Data.

Definition at line 34 of file prefix-announcement-header.cpp.

Member Function Documentation

◆ getPrefixAnn()

const std::optional<PrefixAnnouncement>& ndn::lp::PrefixAnnouncementHeader::getPrefixAnn ( ) const
inline

Definition at line 64 of file prefix-announcement-header.hpp.

◆ wireDecode()

void ndn::lp::PrefixAnnouncementHeader::wireDecode ( const Block wire)

Definition at line 60 of file prefix-announcement-header.cpp.

◆ wireEncode()

template<encoding::Tag TAG>
size_t ndn::lp::PrefixAnnouncementHeader::wireEncode ( EncodingImpl< TAG > &  encoder) const

Encodes the prefix announcement header to the wire format.

Exceptions
Errorthis instance does not contain a PrefixAnnouncement.

Definition at line 44 of file prefix-announcement-header.cpp.