22 #ifndef NDN_CXX_KEY_LOCATOR_HPP
23 #define NDN_CXX_KEY_LOCATOR_HPP
31 class KeyLocator :
private boost::equality_comparable<KeyLocator>
60 template<encoding::Tag TAG>
78 return std::holds_alternative<std::monostate>(m_locator);
129 print(std::ostream& os)
const;
139 return lhs.m_locator == rhs.m_locator;
154 std::variant<std::monostate, Name, Block, uint32_t> m_locator;
156 mutable Block m_wire;
Represents a TLV element of the NDN packet format.
const Block & getKeyDigest() const
Get nested KeyDigest element.
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
friend std::ostream & operator<<(std::ostream &os, const KeyLocator &kl)
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.
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)
std::shared_ptr< const Buffer > ConstBufferPtr