26 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Link>));
31 "Link::Error should inherit from Data::Error");
42 , m_delegations(delegations)
52 if (m_delegations.empty()) {
71 m_delegations.clear();
74 for (
const auto& del : content.elements()) {
76 m_delegations.emplace_back(del);
94 if (std::find(m_delegations.begin(), m_delegations.end(), name) != m_delegations.end()) {
98 m_delegations.push_back(name);
106 auto last = std::remove(m_delegations.begin(), m_delegations.end(), name);
107 if (last == m_delegations.end()) {
111 m_delegations.erase(last, m_delegations.end());
Data & setContentType(uint32_t type)
Copyright (c) 2011-2015 Regents of the University of California.
void wireDecode(const Block &wire)
Decode from wire.
bool addDelegation(const Name &name)
Append a delegation at the end.
std::string to_string(const T &val)
constexpr bool isCriticalType(uint32_t type)
Determine whether a TLV-TYPE is "critical" for evolvability purpose.
Data & setContent(const Block &block)
Set Content from a Block.
Block makeNestedBlock(uint32_t type, const U &value)
Create a TLV block containing a nested TLV element.
Represents a TLV element of the NDN packet format.
void wireDecode(const Block &wire)
Decode from the wire format.
another name that identifies the actual data content
a concept check for TLV abstraction with .wireEncode method
bool removeDelegation(const Name &name)
Remove a delegation whose name is name.
Represents an absolute name.
Link()
Create an empty Link object.
void setDelegationList(std::vector< Name > delegations)
Set the delegations.
const Block & getContent() const noexcept
Get the Content element.
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