Classes | Public Member Functions | List of all members
ndn::RegisteredPrefixTable Class Reference

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...
 

Detailed Description

A RegisteredPrefixTable is an internal class to hold a list of registered prefixes with information necessary to remove the registration later.

Constructor & Destructor Documentation

ndn::RegisteredPrefixTable::RegisteredPrefixTable ( InterestFilterTable interestFilterTable)
inline

Create a new RegisteredPrefixTable with an empty table.

Parameters
interestFilterTableSee removeRegisteredPrefix(), which may call interestFilterTable.unsetInterestFilter().

Member Function Documentation

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.

Parameters
registeredPrefixIdThe ID from Node::getNextEntryId().
prefixA shared_ptr for the prefix.
relatedInterestFilterId(optional) The related interestFilterId for the filter set in the same registerPrefix operation. If omitted, set to 0.
Returns
True if added an entry, false if removeRegisteredPrefix was already called with the registeredPrefixId.
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.

Parameters
registeredPrefixIdThe ID returned from registerPrefix.

The documentation for this class was generated from the following files: