22 #ifndef NDN_CXX_KEY_LOCATOR_HPP
23 #define NDN_CXX_KEY_LOCATOR_HPP
59 template<encoding::Tag TAG>
77 return holds_alternative<monostate>(m_locator);
133 return lhs.m_locator == rhs.m_locator;
139 return lhs.m_locator != rhs.m_locator;
147 variant<monostate, Name, Block, uint32_t> m_locator;
149 mutable Block m_wire;
#define NDN_CXX_NODISCARD
Represents a TLV element of the NDN packet format.
const Block & getKeyDigest() const
Get nested KeyDigest element.
friend bool operator!=(const KeyLocator &lhs, const KeyLocator &rhs)
const Name & getName() const
Get nested Name element.
friend bool operator==(const KeyLocator &lhs, const KeyLocator &rhs)
KeyLocator()
Construct an empty KeyLocator.
const Block & wireEncode() const
void wireDecode(const Block &wire)
Decode from wire encoding.
KeyLocator & setKeyDigest(const Block &keyDigest)
Set nested KeyDigest element (whole TLV).
KeyLocator & clear()
Reset KeyLocator to its default-constructed state.
KeyLocator & setName(const Name &name)
Set nested Name element.
friend std::ostream & operator<<(std::ostream &, const KeyLocator &)
Represents an absolute name.
Represents an error in TLV encoding or decoding.
Error(const char *expectedType, uint32_t actualType)
#define NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
shared_ptr< const Buffer > ConstBufferPtr
std::ostream & operator<<(std::ostream &os, const Data &data)