29 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<KeyLocator>));
    30 BOOST_CONCEPT_ASSERT((WireEncodable<KeyLocator>));
    31 BOOST_CONCEPT_ASSERT((WireEncodableWithEncodingBuffer<KeyLocator>));
    32 BOOST_CONCEPT_ASSERT((WireDecodable<KeyLocator>));
    33 static_assert(std::is_base_of<tlv::Error, KeyLocator::Error>::value,
    34               "KeyLocator::Error must inherit from tlv::Error");
    50 template<encoding::Tag TAG>
    57   size_t totalLength = 0;
    61     [&] (
const Name& name)    { totalLength += name.wireEncode(encoder); },
    62     [&] (
const Block& digest) { totalLength += encoder.prependBlock(digest); },
    64   visit(visitor, m_locator);
    66   totalLength += encoder.prependVarNumber(totalLength);
    85   m_wire = buffer.block();
   100   if (element == m_wire.
elements().end()) {
   104   switch (element->type()) {
   106     m_locator.emplace<
Name>(*element);
   109     m_locator.emplace<
Block>(*element);
   112     m_locator = element->
type();
   120   switch (m_locator.index()) {
   128     return get<uint32_t>(m_locator);
   137   m_locator = monostate{};
   146     return get<Name>(m_locator);
   148   catch (
const bad_variant_access&) {
   165     return get<Block>(m_locator);
   167   catch (
const bad_variant_access&) {
   178   m_locator = keyDigest;
   186   BOOST_ASSERT(keyDigest != 
nullptr);
   199     [&] (
const Name& name) {
   200       os << 
"Name=" << name;
   202     [&] (
const Block& digest) {
   209     [&] (uint32_t type) {
   210       os << 
"Unknown(" << type << 
")";
   212   visit(visitor, keyLocator.m_locator);
 
std::string to_string(const T &val)
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. 
void parse() const
Parse TLV-VALUE into sub-elements. 
KeyLocator & setKeyDigest(const Block &keyDigest)
Set nested KeyDigest element (whole TLV). 
Represents a TLV element of NDN packet format. 
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation. 
element_const_iterator elements_begin() const
Equivalent to elements().begin() 
KeyLocator()
Construct an empty KeyLocator. 
const Block & wireEncode() const
const element_container & elements() const
Get container of sub-elements. 
void reset() noexcept
Reset the Block to a default-constructed state. 
Block makeBinaryBlock(uint32_t type, const uint8_t *value, size_t length)
Create a TLV block copying TLV-VALUE from raw buffer. 
const size_t MAX_KEY_DIGEST_OCTETS_TO_SHOW
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
Represents an absolute name. 
KeyLocator & clear()
Reset KeyLocator to its default-constructed state. 
#define NDN_CXX_UNREACHABLE
friend std::ostream & operator<<(std::ostream &, const KeyLocator &)
void printHex(std::ostream &os, uint64_t num, bool wantUpperCase)
Output the hex representation of num to the output stream os. 
constexpr detail::make_overload_t overload
EncodingImpl< EncoderTag > EncodingBuffer
uint32_t type() const
Return the TLV-TYPE of the Block. 
EncodingImpl< EstimatorTag > EncodingEstimator
shared_ptr< const Buffer > ConstBufferPtr
R visit(const Visitor &v, V1 const &arg1)