A RegisteredPrefixTable is an internal class to hold a list of registered prefixes with information necessary to remove the registration later. More...
#include <registered-prefix-table.hpp>
Public Member Functions | |
RegisteredPrefixTable (InterestFilterTable &interestFilterTable) | |
Create a new RegisteredPrefixTable with an empty table. More... | |
bool | add (uint64_t registeredPrefixId, const ptr_lib::shared_ptr< const Name > &prefix, uint64_t relatedInterestFilterId) |
Add a new entry to the table. More... | |
void | removeRegisteredPrefix (uint64_t registeredPrefixId) |
Remove the registered prefix entry with the registeredPrefixId from the registered prefix table. More... | |
A RegisteredPrefixTable is an internal class to hold a list of registered prefixes with information necessary to remove the registration later.
|
inline |
Create a new RegisteredPrefixTable with an empty table.
interestFilterTable | See removeRegisteredPrefix(), which may call interestFilterTable.unsetInterestFilter(). |
bool ndn::RegisteredPrefixTable::add | ( | uint64_t | registeredPrefixId, |
const ptr_lib::shared_ptr< const Name > & | prefix, | ||
uint64_t | relatedInterestFilterId | ||
) |
Add a new entry to the table.
However, if removeRegisteredPrefix was already called with the registeredPrefixId, don't add an entry and return false.
registeredPrefixId | The ID from Node::getNextEntryId(). |
prefix | A shared_ptr for the prefix. |
relatedInterestFilterId | (optional) The related interestFilterId for the filter set in the same registerPrefix operation. If omitted, set to 0. |
void ndn::RegisteredPrefixTable::removeRegisteredPrefix | ( | uint64_t | registeredPrefixId | ) |
Remove the registered prefix entry with the registeredPrefixId from the registered prefix table.
This does not affect another registered prefix with a different registeredPrefixId, even if it has the same prefix name. If an interest filter was automatically created by registerPrefix, also call interestFilterTable_.unsetInterestFilter to remove it. If there is no entry with the registeredPrefixId, do nothing.
registeredPrefixId | The ID returned from registerPrefix. |