34 , dataFreshnessPeriod(0_ms)
35 , m_interest(interest.shared_from_this())
36 , m_nameTreeEntry(nullptr)
43 BOOST_ASSERT(m_interest->getName().compare(0, nEqualNameComps,
44 interest.getName(), 0, nEqualNameComps) == 0);
46 return m_interest->getName().compare(nEqualNameComps, Name::npos,
47 interest.getName(), nEqualNameComps) == 0 &&
48 m_interest->getSelectors() == interest.getSelectors();
55 return std::find_if(m_inRecords.begin(), m_inRecords.end(),
56 [&face] (
const InRecord& inRecord) {
return &inRecord.getFace() == &face; });
62 BOOST_ASSERT(this->
canMatch(interest));
64 auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
65 [&face] (
const InRecord& inRecord) {
return &inRecord.getFace() == &face; });
66 if (it == m_inRecords.end()) {
67 m_inRecords.emplace_front(face);
68 it = m_inRecords.begin();
78 auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
79 [&face] (
const InRecord& inRecord) {
return &inRecord.getFace() == &face; });
80 if (it != m_inRecords.end()) {
81 m_inRecords.erase(it);
94 return std::find_if(m_outRecords.begin(), m_outRecords.end(),
95 [&face] (
const OutRecord& outRecord) {
return &outRecord.getFace() == &face; });
101 BOOST_ASSERT(this->
canMatch(interest));
103 auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
104 [&face] (
const OutRecord& outRecord) {
return &outRecord.getFace() == &face; });
105 if (it == m_outRecords.end()) {
106 m_outRecords.emplace_front(face);
107 it = m_outRecords.begin();
110 it->update(interest);
117 auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
118 [&face] (
const OutRecord& outRecord) {
return &outRecord.getFace() == &face; });
119 if (it != m_outRecords.end()) {
120 m_outRecords.erase(it);
void deleteInRecord(const Face &face)
delete the in-record for face if it exists
OutRecordCollection::iterator getOutRecord(const Face &face)
get the out-record for face
contains information about an Interest toward an outgoing face
void deleteOutRecord(const Face &face)
delete the out-record for face if it exists
InRecordCollection::iterator insertOrUpdateInRecord(Face &face, const Interest &interest)
insert or update an in-record
Table::const_iterator iterator
void clearInRecords()
delete all in-records
bool canMatch(const Interest &interest, size_t nEqualNameComps=0) const
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
contains information about an Interest from an incoming face
OutRecordCollection::iterator insertOrUpdateOutRecord(Face &face, const Interest &interest)
insert or update an out-record
Entry(const Interest &interest)
InRecordCollection::iterator getInRecord(const Face &face)
get the in-record for face