27 template<ndn::encoding::Tag TAG>
31 size_t totalLength = 0;
34 totalLength += it->wireEncode(block);
39 totalLength += block.prependVarNumber(totalLength);
54 ndn::EncodingEstimator estimator;
57 ndn::EncodingBuffer buffer(estimatedSize, 0);
73 NDN_THROW(
Error(
"RoutingTableEntry",
m_wire.type()));
77 auto val =
m_wire.elements_begin();
79 if (val !=
m_wire.elements_end() && val->type() == ndn::tlv::Name) {
84 NDN_THROW(
Error(
"Missing required Name field"));
87 for (; val !=
m_wire.elements_end(); ++val) {
92 NDN_THROW(
Error(
"NextHop", val->type()));
reverse_iterator rbegin() const
void addNextHop(const NextHop &nh)
Adds a next hop to the list.
reverse_iterator rend() const
Data abstraction for RouteTableInfo.
void wireDecode(const ndn::Block &wire)
const ndn::Name & getDestination() const
NexthopList & getNexthopList()
const ndn::Block & wireEncode() const
NexthopList m_nexthopList
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(Adjacent)