104 Link(
const Name&
name, std::initializer_list<std::pair<uint32_t, Name>> links);
144 static std::tuple<uint32_t, Name>
163 template<encoding::Tag TAG>
175 removeDelegationNoEncode(
const Name&
name);
178 DelegationSet m_delegations;
183 #endif // NDN_LINK_HPP void addDelegation(uint32_t preference, const Name &name)
Add a delegation in the format of <Name, Preference>
Copyright (c) 2011-2015 Regents of the University of California.
Link()=default
Create an empty Link object.
static std::tuple< uint32_t, Name > getDelegationFromWire(const Block &block, size_t index)
gets the delegation at index from block
Class representing a wire element of NDN-TLV packet format.
void wireDecode(const Block &wire)
Decode from the wire format.
Error(const std::string &what)
std::set< std::pair< uint32_t, Name > > DelegationSet
const DelegationSet & getDelegations() const
Get the pairs of <Name, Preference>
static ssize_t countDelegationsFromWire(const Block &block)
represents a Link instance
bool removeDelegation(const Name &name)
Remove a delegation whose name is name.
Name abstraction to represent an absolute name.
static ssize_t findDelegationFromWire(const Block &block, const Name &delegationName)
finds index of a delegation with delegationName from block
const size_t INVALID_SELECTED_DELEGATION_INDEX