26 #ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
27 #define NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
38 namespace measurements {
57 get(
const Name& name);
103 filter(
Entry* entry)
const;
106 filter(
Entry& entry)
const;
115 MeasurementsAccessor::filter(
Entry& entry)
const
117 return this->filter(&entry);
123 return this->filter(m_measurements.
get(name));
129 return this->filter(m_measurements.
get(fibEntry));
135 return this->filter(m_measurements.
get(pitEntry));
141 return this->filter(m_measurements.
getParent(child));
Represents an entry in the FIB.
Base class of all forwarding strategies.
An EntryPredicate that accepts any entry.
Represents an entry in the Measurements table.
Allows fw::Strategy to access the portion of Measurements table under its namespace.
void extendLifetime(Entry &entry, const time::nanoseconds &lifetime)
Extend lifetime of an entry.
Entry * findLongestPrefixMatch(const Name &name, const EntryPredicate &pred=AnyEntry()) const
Perform a longest prefix match for name.
Entry * getParent(const Entry &child)
Find or insert a Measurements entry for child's parent.
MeasurementsAccessor(Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy)
Entry * get(const Name &name)
Find or insert a Measurements entry for name.
Entry * findExactMatch(const Name &name) const
Perform an exact match.
void extendLifetime(Entry &entry, const time::nanoseconds &lifetime)
Extend lifetime of an entry.
Entry * getParent(const Entry &child)
Find or insert a parent entry.
Entry & get(const Name &name)
Find or insert an entry by name.
Entry * findExactMatch(const Name &name) const
Perform an exact match.
Entry * findLongestPrefixMatch(const Name &name, const EntryPredicate &pred=AnyEntry()) const
Perform a longest prefix match for name.
Represents an entry in the Interest table (PIT).
Represents the Strategy Choice table.
std::function< bool(const Entry &)> EntryPredicate
A predicate that accepts or rejects an entry.