void Exclude::set(const struct ndn_Exclude& excludeStruct) { clear(); for (size_t i = 0; i < excludeStruct.nEntries; ++i) { ndn_ExcludeEntry *entry = &excludeStruct.entries[i]; if (entry->type == ndn_Exclude_COMPONENT) appendComponent(entry->component.value.value, entry->component.value.length); else if (entry->type == ndn_Exclude_ANY) appendAny(); else throw runtime_error("unrecognized ndn_ExcludeType"); } }
void Exclude::set(const ExcludeLite& excludeLite) { clear(); for (size_t i = 0; i < excludeLite.size(); ++i) { const ExcludeLite::Entry& entry = excludeLite.get(i); if (entry.getType() == ndn_Exclude_COMPONENT) appendComponent(Name::Component(entry.getComponent())); else if (entry.getType() == ndn_Exclude_ANY) appendAny(); else throw runtime_error("unrecognized ndn_ExcludeType"); } }
DEPRECATED_IN_NDN_CPP addAny() { return appendAny(); }