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) {
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)
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.
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
another name that identifies the actual data content
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
std::string to_string(const V &v)
Represents a Data packet.
EncodingImpl< EncoderTag > EncodingBuffer
size_t wireEncode(EncodingImpl< TAG > &encoder, uint32_t type=tlv::ForwardingHint) const
encode into wire format
EncodingImpl< EstimatorTag > EncodingEstimator