37 , m_delegations(delegations)
60 m_delegations.clear();
63 for (
const auto& del : content.elements()) {
65 m_delegations.emplace_back(del);
68 NDN_THROW(
Error(
"Unexpected TLV-TYPE " + to_string(del.type()) +
" while decoding LinkContent"));
76 m_delegations = std::move(delegations);
83 if (std::find(m_delegations.begin(), m_delegations.end(), name) != m_delegations.end()) {
87 m_delegations.push_back(name);
95 auto last = std::remove(m_delegations.begin(), m_delegations.end(), name);
96 if (last == m_delegations.end()) {
100 m_delegations.erase(last, m_delegations.end());
Represents a TLV element of the NDN packet format.
Represents a Data packet.
void wireDecode(const Block &wire)
Decode from wire.
Data & setContent(const Block &block)
Set Content from a Block.
const Block & getContent() const noexcept
Get the Content element.
uint32_t getContentType() const noexcept
Return the value of ContentType.
Data & setContentType(uint32_t type)
Set the ContentType.
Link()
Create an empty Link object.
void setDelegationList(std::vector< Name > delegations)
Set the delegations.
void wireDecode(const Block &wire)
Decode from the wire format.
bool addDelegation(const Name &name)
Append a delegation at the end.
bool removeDelegation(const Name &name)
Remove a delegation whose name is name.
Represents an absolute name.
constexpr bool isCriticalType(uint32_t type) noexcept
Determine whether a TLV-TYPE is "critical" for evolvability purpose.
@ ContentType_Link
another name that identifies the actual data content