26 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<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"));
void addDelegation(uint32_t preference, const Name &name)
Add a delegation in the format of <Name, Preference>
Data & setContentType(uint32_t type)
Copyright (c) 2011-2015 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 wire in NDN Packet Format v0.2 or v0.3.
void wireDecode(const Block &wire, bool wantSort=true)
Decode from the wire format.
const Block & getContent() const
Get Content.
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
a concept check for TLV abstraction with .wireEncode method
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 wireEncode(EncodingImpl< TAG > &encoder, uint32_t type=tlv::ForwardingHint) const
encode into wire format
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.
represents a list of Delegations
a concept check for TLV abstraction with .wireEncode method
Represents a Data packet.
a concept check for TLV abstraction with .wireDecode method and constructible from Block ...
uint32_t getContentType() const
EncodingImpl< EncoderTag > EncodingBuffer
indicates content is another name which identifies actual data content
EncodingImpl< EstimatorTag > EncodingEstimator