26 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Link>));
27 BOOST_CONCEPT_ASSERT((WireEncodable<Link>));
28 BOOST_CONCEPT_ASSERT((WireEncodableWithEncodingBuffer<Link>));
29 BOOST_CONCEPT_ASSERT((WireDecodable<Link>));
30 static_assert(std::is_base_of<Data::Error, Link::Error>::value,
31 "Link::Error should inherit from Data::Error");
52 if (m_delList.
size() > 0) {
72 BOOST_THROW_EXCEPTION(
Error(
"Expected ContentType Link"));
95 size_t nErased = m_delList.
erase(name);
void addDelegation(uint32_t preference, const Name &name)
Add a delegation in the format of <Name, Preference>
Data & setContentType(uint32_t type)
Copyright (c) 2013-2017 Regents of the University of California.
existing delegation(s) with the same name are replaced with the new delegation
void wireDecode(const Block &wire)
Decode from the wire format.
void wireDecode(const Block &wire, bool wantSort=true)
Decode from the wire format.
uint32_t getContentType() const
Data & setContent(const Block &block)
Set Content from a block.
Represents a TLV element of NDN packet format.
size_t erase(uint64_t preference, const Name &name)
delete Delegation(s) with specified preference and name
void wireDecode(const Block &block, bool wantSort=true)
decode a DelegationList
bool removeDelegation(const Name &name)
Remove a delegation whose name is name.
size_t size() const noexcept
Represents an absolute name.
bool insert(uint64_t preference, const Name &name, InsertConflictResolution onConflict=INS_REPLACE)
insert Delegation
Link()
Create an empty Link object.
void setDelegationList(const DelegationList &dels)
Set the delegations.
const Block & getContent() const
Get Content.
represents a list of Delegations
Represents a Data packet.
EncodingImpl< EncoderTag > EncodingBuffer
size_t wireEncode(EncodingImpl< TAG > &encoder, uint32_t type=tlv::ForwardingHint) const
encode into wire format
indicates content is another name which identifies actual data content
EncodingImpl< EstimatorTag > EncodingEstimator