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