26 #ifndef NFD_DAEMON_TABLE_PIT_HPP
27 #define NFD_DAEMON_TABLE_PIT_HPP
43 class Iterator :
public boost::forward_iterator_helper<Iterator, const Entry>
54 , m_iPitEntry(iPitEntry)
62 BOOST_ASSERT(m_iPitEntry < m_ntIt->getPitEntries().size());
63 return *m_ntIt->getPitEntries()[m_iPitEntry];
72 return lhs.m_ntIt == rhs.m_ntIt &&
73 lhs.m_iPitEntry == rhs.m_iPitEntry;
84 class Pit : noncopyable
104 find(
const Interest& interest)
const
106 return const_cast<Pit*
>(
this)->findOrInsert(interest,
false).first;
114 std::pair<shared_ptr<Entry>,
bool>
117 return this->findOrInsert(interest,
true);
131 this->
erase(entry,
true);
171 std::pair<shared_ptr<Entry>,
bool>
172 findOrInsert(
const Interest& interest,
bool allowInsert);
Generalization of a network interface.
A common index structure for FIB, PIT, StrategyChoice, and Measurements.
Represents an entry in the Interest table (PIT).
friend bool operator==(const Iterator &lhs, const Iterator &rhs) noexcept
const Entry & operator*() const noexcept
Iterator(const NameTree::const_iterator &ntIt={}, size_t iPitEntry=0)
Constructor.
std::pair< shared_ptr< Entry >, bool > insert(const Interest &interest)
Inserts a PIT entry for interest.
const_iterator begin() const
size_t size() const
Returns the number of entries.
shared_ptr< Entry > find(const Interest &interest) const
Finds a PIT entry for interest.
const_iterator end() const
DataMatchResult findAllDataMatches(const Data &data) const
Performs a Data match.
void deleteInOutRecords(Entry *entry, const Face &face)
Deletes in-records and out-records for face.
void erase(Entry *entry)
Deletes an entry.
std::vector< shared_ptr< Entry > > DataMatchResult
An unordered iterable of all PIT entries matching a Data packet.